rust/tests/ui/macros/expr_2021_old_edition.rs
Eric Holk f364011955
Apply code review suggestions
- use feature_err to report unstable expr_2021
- Update downlevel expr_2021 diagnostics

Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
2024-05-13 11:55:38 -07:00

14 lines
290 B
Rust

//@ compile-flags: --edition=2018
// This test ensures that expr_2021 is not allowed on pre-2021 editions
macro_rules! m {
($e:expr_2021) => { //~ ERROR: invalid fragment specifier `expr_2021`
$e
};
}
fn main() {
m!(()); //~ ERROR: no rules expected the token `(`
}