mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 10:18:25 +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
42 lines
1.6 KiB
Plaintext
42 lines
1.6 KiB
Plaintext
error: missing fragment specifier
|
|
--> $DIR/macro-missing-fragment.rs:4:20
|
|
|
|
|
LL | ( $( any_token $field_rust_type )* ) => {};
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
= 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 | ( $( any_token $field_rust_type:spec )* ) => {};
|
|
| +++++
|
|
|
|
error: missing fragment specifier
|
|
--> $DIR/macro-missing-fragment.rs:9:7
|
|
|
|
|
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: missing fragment specifier
|
|
--> $DIR/macro-missing-fragment.rs:13:7
|
|
|
|
|
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: aborting due to 3 previous errors
|
|
|