File tree 1 file changed +26
-0
lines changed 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Regression test for <https://github.com/rust-lang/rust/issues/59368>.
2
+ // The goal is to ensure that `doc(hidden)`, `doc(inline)` and `doc(no_inline`)
3
+
4
+ #![ crate_name = "foo" ]
5
+ #![ feature( doc_cfg) ]
6
+
7
+ // @has 'foo/index.html'
8
+
9
+ #[ doc( hidden, cfg( feature = "foo" ) ) ]
10
+ pub struct Foo ;
11
+
12
+ #[ doc( hidden, no_inline, cfg( feature = "bar" ) ) ]
13
+ pub use Foo as Foo1 ;
14
+
15
+ #[ doc( hidden, inline) ]
16
+ pub use Foo1 as Foo2 ;
17
+
18
+ // First we ensure that none of the other items are generated.
19
+ // @count - '//a[@class="struct"]' 1
20
+ // Then we check that both `cfg` are displayed.
21
+ // @has - '//*[@class="stab portability"]' 'foo'
22
+ // @has - '//*[@class="stab portability"]' 'bar'
23
+ // And finally we check that the only element displayed is `Bar`.
24
+ // @has - '//a[@class="struct"]' 'Bar'
25
+ #[ doc( inline) ]
26
+ pub use Foo2 as Bar ;
You can’t perform that action at this time.
0 commit comments