Debian Codegraph @

gcc/testsuite/rust/execute/torture/macros27.rs

raw
1 // { dg-additional-options "-frust-cfg=A" }
2
3 macro_rules! attr {
4 (#[$attr:meta] $s:stmt) => {
5 #[$attr]
6 $s;
7 };
8 }
9
10 fn main() -> i32 {
11 let mut a = 0;
12
13 attr! {
14 #[cfg(A)]
15 a = 3
16 };
17
18 attr! {
19 #[cfg(B)]
20 a = 40
21 };
22
23 a - 3
24 }