os-rust/tests/ui/macros/feature-gate-expr_fragment_specifier_2024.rs
Eric Holk ef6478ba5f
Add expr_2021 nonterminal and feature flag
This commit adds a new nonterminal `expr_2021` in macro patterns, and
`expr_fragment_specifier_2024` feature flag. For now, `expr` and
`expr_2021` are treated the same, but in future PRs we will update
`expr` to match to new grammar.

Co-authored-by: Vincezo Palazzo <vincenzopalazzodev@gmail.com>
2024-05-13 11:27:26 -07:00

11 lines
181 B
Rust

//@ compile-flags: --edition=2024 -Z unstable-options
macro_rules! m {
($e:expr_2021) => { //~ ERROR: expr_2021 is experimental
$e
};
}
fn main() {
m!(());
}