Debian Codegraph @

gcc/testsuite/rust/execute/torture/macro-issue1426.rs

raw
1 macro_rules! stmt {
2 ($s:stmt) => {
3 $s
4 };
5 ($s:stmt, $($ss:stmt),*) => {
6 $s;
7 stmt!($($ss),*);
8 };
9 }
10
11 pub fn test() -> i32 {
12 stmt!(
13 let a = 1
14 // { dg-warning {unused name 'a'} {} { target *-*-* } .-1 }
15 );
16 stmt!(
17 let b = 2,
18 let c = 3,
19 let d = 4,
20 let e = 5,
21 let f = b + c + d + e
22 );
23
24 f
25 }
26
27 fn main() -> i32 {
28 test() - 14
29 }