]> git.lizzy.rs Git - rust.git/blob - tests/ui/inline-const/macro-with-const.rs
Rollup merge of #105172 - alexs-sh:issue-98861-fix-next, r=scottmcm
[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 }