rust/tests/ui/macros/expr_2021.rs

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

15 lines
235 B
Rust
Raw Normal View History

//@ check-pass
//@ edition: 2015
// Ensures expr_2021 fragment specifier is accepted in old editions
macro_rules! my_macro {
($x:expr_2021) => {
println!("Hello, {}!", $x);
};
}
fn main() {
my_macro!("world");
}