mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-24 14:08:17 +00:00
Since [1], the fragment specifier is unconditionally required in all editions. This means `NonTerminalKind` no longer needs to be optional, as we can reject this code during the expansion of `macro_rules!` rather than handling it throughout the code. Do this cleanup here. [1]: https://github.com/rust-lang/rust/pull/128425
76 lines
2.1 KiB
Plaintext
76 lines
2.1 KiB
Plaintext
error: missing fragment specifier
|
|
--> $DIR/macro-missing-fragment-deduplication.rs:4:6
|
|
|
|
|
LL | ($name) => {};
|
|
| ^^^^^
|
|
|
|
|
= note: fragment specifiers must be provided
|
|
= help: valid fragment specifiers are `ident`, `block`, `stmt`, `expr`, `pat`, `ty`, `lifetime`, `literal`, `path`, `meta`, `tt`, `item` and `vis`, along with `expr_2021` and `pat_param` for edition compatibility
|
|
help: try adding a specifier here
|
|
|
|
|
LL | ($name:spec) => {};
|
|
| +++++
|
|
|
|
error: unexpected end of macro invocation
|
|
--> $DIR/macro-missing-fragment-deduplication.rs:8:5
|
|
|
|
|
LL | macro_rules! m {
|
|
| -------------- when calling this macro
|
|
...
|
|
LL | m!();
|
|
| ^^^^ missing tokens in macro arguments
|
|
|
|
|
note: while trying to match meta-variable `$name:tt`
|
|
--> $DIR/macro-missing-fragment-deduplication.rs:4:6
|
|
|
|
|
LL | ($name) => {};
|
|
| ^^^^^
|
|
|
|
error: unexpected end of macro invocation
|
|
--> $DIR/macro-missing-fragment-deduplication.rs:9:5
|
|
|
|
|
LL | macro_rules! m {
|
|
| -------------- when calling this macro
|
|
...
|
|
LL | m!();
|
|
| ^^^^ missing tokens in macro arguments
|
|
|
|
|
note: while trying to match meta-variable `$name:tt`
|
|
--> $DIR/macro-missing-fragment-deduplication.rs:4:6
|
|
|
|
|
LL | ($name) => {};
|
|
| ^^^^^
|
|
|
|
error: unexpected end of macro invocation
|
|
--> $DIR/macro-missing-fragment-deduplication.rs:10:5
|
|
|
|
|
LL | macro_rules! m {
|
|
| -------------- when calling this macro
|
|
...
|
|
LL | m!();
|
|
| ^^^^ missing tokens in macro arguments
|
|
|
|
|
note: while trying to match meta-variable `$name:tt`
|
|
--> $DIR/macro-missing-fragment-deduplication.rs:4:6
|
|
|
|
|
LL | ($name) => {};
|
|
| ^^^^^
|
|
|
|
error: unexpected end of macro invocation
|
|
--> $DIR/macro-missing-fragment-deduplication.rs:11:5
|
|
|
|
|
LL | macro_rules! m {
|
|
| -------------- when calling this macro
|
|
...
|
|
LL | m!();
|
|
| ^^^^ missing tokens in macro arguments
|
|
|
|
|
note: while trying to match meta-variable `$name:tt`
|
|
--> $DIR/macro-missing-fragment-deduplication.rs:4:6
|
|
|
|
|
LL | ($name) => {};
|
|
| ^^^^^
|
|
|
|
error: aborting due to 5 previous errors
|
|
|