We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb14ad0 commit 68d0094Copy full SHA for 68d0094
src/test/rustdoc/doc_auto_cfg_nested_impl.rs
@@ -0,0 +1,24 @@
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
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
+}
0 commit comments