We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75ef9fd commit 510b73dCopy full SHA for 510b73d
gcc/testsuite/rust/compile/cfg-core1.rs
@@ -0,0 +1,12 @@
1
+// { dg-additional-options "-frust-cfg=A -frust-cfg=B" }
2
+
3
+#[cfg_attr(A, cfg(B))]
4
+struct Foo0;
5
6
+#[cfg_attr(A, cfg(C))]
7
+struct Bar0;
8
9
+fn main() {
10
+ let a = Foo0;
11
+ let a = Bar0; // { dg-error "cannot find value" }
12
+}
gcc/testsuite/rust/compile/cfg-core2.rs
+// { dg-additional-options "-frust-cfg=B" }
+#[cfg(not(any(A, B)))]
+#[cfg(not(any(A, C)))]
+ let a = Foo0; // { dg-error "cannot find value" }
+ let a = Bar0;
0 commit comments