-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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 #108936 - GuillaumeGomez:rustdoc-anonymous-reexport, …
…r=notriddle Rustdoc: don't hide anonymous reexport Fixes #108931. From #108931, it appears that having anonymous re-exports for traits is actually used in some places, so instead of hiding them automatically, we should prevent them to be ever inlined. r? `@notriddle`
- Loading branch information
Showing
3 changed files
with
34 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Ensuring that anonymous re-exports are always inlined. | ||
|
||
#![crate_name = "foo"] | ||
|
||
pub mod foo { | ||
pub struct Foo; | ||
} | ||
|
||
mod bar { | ||
pub struct Bar; | ||
} | ||
|
||
// @has 'foo/index.html' | ||
// We check that the only "h2" present are "Re-exports" and "Modules". | ||
// @count - '//*[@id="main-content"]/h2' 2 | ||
// @has - '//*[@id="main-content"]/h2' 'Re-exports' | ||
// @has - '//*[@id="main-content"]/h2' 'Modules' | ||
// @has - '//*[@id="main-content"]//*[@class="item-table"]//li//code' 'pub use foo::Foo as _;' | ||
// @has - '//*[@id="main-content"]//*[@class="item-table"]//li//code' 'pub use bar::Bar as _;' | ||
pub use foo::Foo as _; | ||
pub use bar::Bar as _; |