Skip to content

Commit 9906504

Browse files
Add regression test for re-export of doc hidden item inside private item not displayed
1 parent 5528757 commit 9906504

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// This test ensures that a re-export of `#[doc(hidden)]` item inside a private
2+
// module will still be displayed (the re-export, not the item).
3+
4+
#![crate_name = "foo"]
5+
6+
mod private_module {
7+
#[doc(hidden)]
8+
pub struct Public;
9+
}
10+
11+
// @has 'foo/index.html'
12+
// @has - '//*[@id="reexport.Foo"]/code' 'pub use crate::private_module::Public as Foo;'
13+
pub use crate::private_module::Public as Foo;
14+
// Glob re-exports with no visible items should not be displayed.
15+
// @count - '//*[@class="item-table"]/li' 1
16+
pub use crate::private_module::*;

0 commit comments

Comments
 (0)