rust/tests/ui/inline-const/macro-with-const.rs
2024-02-16 20:02:50 +00:00

21 lines
236 B
Rust

//@ 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);
}