File tree 1 file changed +30
-0
lines changed
1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ // This test ensures that only the re-export `cfg` will be displayed and that it won't
2
+ // include `cfg`s from the previous chained items.
3
+
4
+ #![ crate_name = "foo" ]
5
+ #![ feature( doc_auto_cfg, doc_cfg) ]
6
+
7
+ mod foo {
8
+ #[ cfg( not( feature = "foo" ) ) ]
9
+ pub struct Bar ;
10
+
11
+ #[ doc( cfg( not( feature = "bar" ) ) ) ]
12
+ pub struct Bar2 ;
13
+ }
14
+
15
+ // @has 'foo/index.html'
16
+ // @has - '//*[@class="item-name"]' 'BabarNon-lie'
17
+ #[ cfg( not( feature = "lie" ) ) ]
18
+ pub use crate :: foo:: Bar as Babar ;
19
+
20
+ // @has - '//*[@class="item-name"]' 'Babar2Non-cake'
21
+ #[ doc( cfg( not( feature = "cake" ) ) ) ]
22
+ pub use crate :: foo:: Bar2 as Babar2 ;
23
+
24
+ // @has - '//*[@class="item-table"]/li' 'pub use crate::Babar as Elephant;Non-robot'
25
+ #[ cfg( not( feature = "robot" ) ) ]
26
+ pub use crate :: Babar as Elephant ;
27
+
28
+ // @has - '//*[@class="item-table"]/li' 'pub use crate::Babar2 as Elephant2;Non-cat'
29
+ #[ doc( cfg( not( feature = "cat" ) ) ) ]
30
+ pub use crate :: Babar2 as Elephant2 ;
You can’t perform that action at this time.
0 commit comments