summaryrefslogtreecommitdiffstats
path: root/src/test/ui/inline-const/macro-with-const.rs
blob: e7393166d8df3bdf32ed698c3e5ea3a752ce3c8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// check-pass

macro_rules! exp {
    (const $n:expr) => {
        $n
    };
}

macro_rules! stmt {
    (exp $e:expr) => {
        $e
    };
    (exp $($t:tt)+) => {
        exp!($($t)+)
    };
}

fn main() {
    stmt!(exp const 1);
}