]> git.lizzy.rs Git - rust.git/blob - tests/ui/inline-const/macro-with-const.rs
Auto merge of #106458 - albertlarsan68:move-tests, r=jyn514
[rust.git] / tests / ui / inline-const / macro-with-const.rs
1 // check-pass
2
3 macro_rules! exp {
4     (const $n:expr) => {
5         $n
6     };
7 }
8
9 macro_rules! stmt {
10     (exp $e:expr) => {
11         $e
12     };
13     (exp $($t:tt)+) => {
14         exp!($($t)+)
15     };
16 }
17
18 fn main() {
19     stmt!(exp const 1);
20 }