rust/tests/ui/macros/expr_2021.rs
Eric Holk c7cd55f7c5 Stabilize expr_2021 fragment in all editions
Co-authored-by: Michael Goulet <michael@errs.io>
Co-authored-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2024-10-01 07:51:58 +00:00

15 lines
235 B
Rust

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