File tree Expand file tree Collapse file tree 3 files changed +19
-7
lines changed Expand file tree Collapse file tree 3 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -2162,6 +2162,7 @@ impl Clean<Vec<Item>> for doctree::Import<'_> {
21622162 // #[doc(no_inline)] attribute is present.
21632163 // Don't inline doc(hidden) imports so they can be stripped at a later stage.
21642164 let mut denied = !self . vis . node . is_pub ( )
2165+ || ( self . vis . node . is_pub ( ) && self . name == kw:: Underscore )
21652166 || self . attrs . iter ( ) . any ( |a| {
21662167 a. has_name ( sym:: doc)
21672168 && match a. meta_item_list ( ) {
@@ -2171,8 +2172,7 @@ impl Clean<Vec<Item>> for doctree::Import<'_> {
21712172 }
21722173 None => false ,
21732174 }
2174- } )
2175- || ( self . vis . node . is_pub ( ) && self . name == kw:: Underscore ) ;
2175+ } ) ;
21762176 // Also check whether imports were asked to be inlined, in case we're trying to re-export a
21772177 // crate in Rust 2018+
21782178 let please_inline = self . attrs . lists ( sym:: doc) . has_word ( sym:: inline) ;
Original file line number Diff line number Diff line change 1+ #![ crate_name = "foo" ]
2+
3+ pub trait FooTrait { }
4+ pub struct FooStruct ;
Original file line number Diff line number Diff line change 1- pub mod foo {
2- pub struct Foo ;
3- }
1+ // aux-build:issue-61592.rs
2+
3+ extern crate foo;
4+
5+ // @has issue_61592/index.html
6+ // @has - '//a[@href="#reexports"]' 'Re-exports'
7+ // @has - '//code' 'pub use foo::FooTrait as _;'
8+ // @!has - '//a[@href="trait._.html"]'
9+ pub use foo:: FooTrait as _;
410
511// @has issue_61592/index.html
6- // @has - '//*[@href="#reexports"]' 'Re-exports'
7- pub use foo:: Foo as _;
12+ // @has - '//a[@href="#reexports"]' 'Re-exports'
13+ // @has - '//code' 'pub use foo::FooStruct as _;'
14+ // @!has - '//a[@href="struct._.html"]'
15+ pub use foo:: FooStruct as _;
You can’t perform that action at this time.
0 commit comments