f364011955
- use feature_err to report unstable expr_2021 - Update downlevel expr_2021 diagnostics Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
14 lines
290 B
Rust
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 `(`
|
|
}
|