forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#112836 - GuillaumeGomez:rustdoc-invalid-fil…
…e-creation, r=notriddle [rustdoc] partially fix invalid files creation Part of rust-lang#111249. It only removes generation for modules which shouldn't exist. For files, we need the compiler to keep re-export information alive for external items so we can actually have the right path to their location as it's currently not generating them correctly. In case the item is inlined, it shouldn't (and neither should its children) get a file generated. r? `@notriddle`
- Loading branch information
Showing
9 changed files
with
138 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#![crate_name="foo"] | ||
|
||
// @!has "foo/struct.Foo.html" | ||
#[doc(hidden)] | ||
pub struct Foo; | ||
|
||
// @!has "foo/struct.Bar.html" | ||
pub use crate::Foo as Bar; | ||
|
||
// @!has "foo/struct.Baz.html" | ||
#[doc(hidden)] | ||
pub use crate::Foo as Baz; | ||
|
||
// @!has "foo/foo/index.html" | ||
#[doc(hidden)] | ||
pub mod foo {} | ||
|
||
// @!has "foo/bar/index.html" | ||
pub use crate::foo as bar; | ||
|
||
// @!has "foo/baz/index.html" | ||
#[doc(hidden)] | ||
pub use crate::foo as baz; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#![crate_name="foo"] | ||
|
||
// @!has "foo/priv/index.html" | ||
// @!has "foo/priv/struct.Foo.html" | ||
mod private { | ||
pub struct Foo; | ||
} | ||
|
||
// @has "foo/struct.Bar.html" | ||
pub use crate::private::Foo as Bar; | ||
|
||
// @!has "foo/foo/index.html" | ||
mod foo { | ||
pub mod subfoo {} | ||
} | ||
|
||
// @has "foo/bar/index.html" | ||
pub use crate::foo::subfoo as bar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#![crate_name = "foo"] | ||
#![feature(no_core)] | ||
#![no_core] | ||
|
||
// The following five should not fail! | ||
// @!has 'foo/hidden/index.html' | ||
// @!has 'foo/hidden/inner/index.html' | ||
// FIXME: Should be `@!has`: https://github.com/rust-lang/rust/issues/111249 | ||
// @has 'foo/hidden/inner/trait.Foo.html' | ||
// @matchesraw - '<meta http-equiv="refresh" content="0;URL=../../../foo/visible/trait.Foo.html">' | ||
// @!has 'foo/hidden/inner/inner_hidden/index.html' | ||
// @!has 'foo/hidden/inner/inner_hidden/trait.HiddenFoo.html' | ||
#[doc(hidden)] | ||
pub mod hidden { | ||
pub mod inner { | ||
pub trait Foo {} | ||
|
||
#[doc(hidden)] | ||
pub mod inner_hidden { | ||
pub trait HiddenFoo {} | ||
} | ||
} | ||
} | ||
|
||
// @has 'foo/visible/index.html' | ||
// @has 'foo/visible/trait.Foo.html' | ||
#[doc(inline)] | ||
pub use hidden::inner as visible; | ||
|
||
// @has 'foo/struct.Bar.html' | ||
// @count - '//*[@id="impl-Foo-for-Bar"]' 1 | ||
pub struct Bar; | ||
|
||
impl visible::Foo for Bar {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters