rust/tests/ui/macros/expr_2021_old_edition.stderr
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

27 lines
796 B
Plaintext

error: invalid fragment specifier `expr_2021`
--> $DIR/expr_2021_old_edition.rs:6:6
|
LL | ($e:expr_2021) => {
| ^^^^^^^^^^^^
|
= help: fragment specifier `expr_2021` requires Rust 2021 or later
valid fragment specifiers are `ident`, `block`, `stmt`, `expr`, `pat`, `ty`, `lifetime`, `literal`, `path`, `meta`, `tt`, `item` and `vis`
error: no rules expected the token `(`
--> $DIR/expr_2021_old_edition.rs:12:8
|
LL | macro_rules! m {
| -------------- when calling this macro
...
LL | m!(());
| ^ no rules expected this token in macro call
|
note: while trying to match meta-variable `$e:ident`
--> $DIR/expr_2021_old_edition.rs:6:6
|
LL | ($e:expr_2021) => {
| ^^^^^^^^^^^^
error: aborting due to 2 previous errors