rust/tests/ui/inline-const/macro-with-const.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
235 B
Rust
Raw Normal View History

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