1 // Regression test for <https://github.com/rust-lang/rust/issues/101129>.
3 #![feature(doc_auto_cfg)]
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 {}
17 #[cfg(not(feature = "coolstuff"))]
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 {}