Skip to content

Commit a825b1e

Browse files
Add regression test where private item with intermediate doc hidden re-export was not inlined
1 parent 96892a5 commit a825b1e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// This test ensures that if a private item is re-exported with an intermediate
2+
// `#[doc(hidden)]` re-export, it'll still be inlined (and not include any attribute
3+
// from the doc hidden re-export.
4+
5+
#![crate_name = "foo"]
6+
7+
// @has 'foo/index.html'
8+
// There should only be one struct displayed.
9+
// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 1
10+
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Structs'
11+
// @has - '//*[@id="main-content"]//a[@href="struct.Reexport.html"]' 'Reexport'
12+
// @has - '//*[@id="main-content"]//*[@class="desc docblock-short"]' 'Visible. Original.'
13+
14+
mod private {
15+
/// Original.
16+
pub struct Bar3;
17+
}
18+
19+
/// Hidden.
20+
#[doc(hidden)]
21+
pub use crate::private::Bar3;
22+
/// Visible.
23+
pub use self::Bar3 as Reexport;

0 commit comments

Comments
 (0)