aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/cfg3.rs
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/rust/compile/cfg3.rs')
-rw-r--r--gcc/testsuite/rust/compile/cfg3.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/cfg3.rs b/gcc/testsuite/rust/compile/cfg3.rs
new file mode 100644
index 0000000..d6ffab6
--- /dev/null
+++ b/gcc/testsuite/rust/compile/cfg3.rs
@@ -0,0 +1,11 @@
+// { dg-additional-options "-w -frust-cfg=A -frust-cfg=B" }
+struct Foo;
+impl Foo {
+ #[cfg(all(A, B))]
+ fn test(&self) {}
+}
+
+fn main() {
+ let a = Foo;
+ a.test();
+}