aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/execute/torture/macros21.rs
blob: 2508be1a6fdca6c0241fbcc7cda8f2cba7613f33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
macro_rules! add_parens {
    ($($rep:ident ( ) )*) => {
        { 0 $(+ $rep ( ))* }
    };
}

fn f() -> i32 {
    1
}

fn main() -> i32 {
    let a = add_parens!(f() f() f());

    a - 3
}