File tree 1 file changed +32
-0
lines changed
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ // This test ensures that non-glob reexports don't get their attributes merge with
2
+ // the reexported item whereas glob reexports do.
3
+ // Regression test for <https://github.com/rust-lang/rust/issues/120487>.
4
+
5
+ #![ crate_name = "foo" ]
6
+ #![ feature( doc_cfg) ]
7
+
8
+ // @has 'foo/index.html'
9
+ // There are two items.
10
+ // @count - '//*[@class="item-table"]//div[@class="item-name"]' 2
11
+ // Only one of them should have an attribute.
12
+ // @count - '//*[@class="item-table"]//div[@class="item-name"]/*[@class="stab portability"]' 1
13
+
14
+ mod a {
15
+ #[ doc( cfg( not( feature = "a" ) ) ) ]
16
+ #[ cfg( not( feature = "a" ) ) ]
17
+ pub struct Test1 ;
18
+ }
19
+
20
+ mod b {
21
+ #[ doc( cfg( not( feature = "a" ) ) ) ]
22
+ #[ cfg( not( feature = "a" ) ) ]
23
+ pub struct Test2 ;
24
+ }
25
+
26
+ // @has 'foo/struct.Test1.html'
27
+ // @count - '//*[@id="main-content"]/*[@class="item-info"]' 1
28
+ // @has - '//*[@id="main-content"]/*[@class="item-info"]' 'Available on non-crate feature a only.'
29
+ pub use a:: * ;
30
+ // @has 'foo/struct.Test2.html'
31
+ // @count - '//*[@id="main-content"]/*[@class="item-info"]' 0
32
+ pub use b:: Test2 ;
You can’t perform that action at this time.
0 commit comments