File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ // Regression test for <https://github.com/rust-lang/rust/issues/101129>.
2+
3+ #![ feature( doc_auto_cfg) ]
4+ #![ crate_type = "lib" ]
5+ #![ crate_name = "foo" ]
6+
7+ pub struct S ;
8+ pub trait MyTrait1 { }
9+ pub trait MyTrait2 { }
10+
11+ // @has foo/struct.S.html
12+ // @has - '//*[@id="impl-MyTrait1-for-S"]//*[@class="stab portability"]' \
13+ // 'Available on non-crate feature coolstuff only.'
14+ #[ cfg( not( feature = "coolstuff" ) ) ]
15+ impl MyTrait1 for S { }
16+
17+ #[ cfg( not( feature = "coolstuff" ) ) ]
18+ mod submod {
19+ use crate :: { S , MyTrait2 } ;
20+ // This impl should also have the `not(feature = "coolstuff")`.
21+ // @has - '//*[@id="impl-MyTrait2-for-S"]//*[@class="stab portability"]' \
22+ // 'Available on non-crate feature coolstuff only.'
23+ impl MyTrait2 for S { }
24+ }
You can’t perform that action at this time.
0 commit comments