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<'_> {
2162
2162
// #[doc(no_inline)] attribute is present.
2163
2163
// Don't inline doc(hidden) imports so they can be stripped at a later stage.
2164
2164
let mut denied = !self . vis . node . is_pub ( )
2165
+ || ( self . vis . node . is_pub ( ) && self . name == kw:: Underscore )
2165
2166
|| self . attrs . iter ( ) . any ( |a| {
2166
2167
a. has_name ( sym:: doc)
2167
2168
&& match a. meta_item_list ( ) {
@@ -2171,8 +2172,7 @@ impl Clean<Vec<Item>> for doctree::Import<'_> {
2171
2172
}
2172
2173
None => false ,
2173
2174
}
2174
- } )
2175
- || ( self . vis . node . is_pub ( ) && self . name == kw:: Underscore ) ;
2175
+ } ) ;
2176
2176
// Also check whether imports were asked to be inlined, in case we're trying to re-export a
2177
2177
// crate in Rust 2018+
2178
2178
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 _;
4
10
5
11
// @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