Skip to content

Commit 675640c

Browse files
Add test for displayed re-export of doc(hidden)
1 parent 2633d5f commit 675640c

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

tests/rustdoc/reexport-doc-hidden.rs

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Part of <https://github.com/rust-lang/rust/issues/59368>.
2+
// This test ensures that reexporting a `doc(hidden)` item will
3+
// still show the reexport.
4+
5+
#![crate_name = "foo"]
6+
7+
#[doc(hidden)]
8+
pub type Type = u32;
9+
10+
// @has 'foo/index.html'
11+
// @has - '//*[@id="reexport.Type2"]/code' 'pub use crate::Type as Type2;'
12+
pub use crate::Type as Type2;
13+
14+
// @count - '//*[@id="reexport.Type3"]' 0
15+
#[doc(hidden)]
16+
pub use crate::Type as Type3;
17+
18+
#[macro_export]
19+
#[doc(hidden)]
20+
macro_rules! foo {
21+
() => {};
22+
}
23+
24+
// This is a bug: https://github.com/rust-lang/rust/issues/59368
25+
// @!has - '//*[@id="reexport.Macro"]/code' 'pub use crate::foo as Macro;'
26+
pub use crate::foo as Macro;

0 commit comments

Comments
 (0)