aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/execute/torture/macros1.rs
blob: 652d2d8fe5bf722a80e84ab54c525151cf5ee580 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
macro_rules! add {
    ($a:expr,$b:expr) => {
        $a + $b
    };
}

fn test() -> i32 {
    add!(1 + 2, 3)
}

fn main() -> i32 {
    test() - 6
}