2021-12-01 13:45:14 -06:00
|
|
|
error: no rules expected the token `enum E {}`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/nonterminal-matching.rs:19:10
|
2018-03-24 08:00:44 -05:00
|
|
|
|
|
2019-06-06 16:37:47 -05:00
|
|
|
LL | macro n(a $nt_item b) {
|
|
|
|
| --------------------- when calling this macro
|
|
|
|
...
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | n!(a $nt_item b);
|
2018-11-04 16:01:38 -06:00
|
|
|
| ^^^^^^^^ no rules expected this token in macro call
|
2018-03-24 08:00:44 -05:00
|
|
|
...
|
|
|
|
LL | complex_nonterminal!(enum E {});
|
2021-10-14 13:28:28 -05:00
|
|
|
| ------------------------------- in this macro invocation
|
2019-12-16 07:56:47 -06:00
|
|
|
|
|
2022-11-12 16:18:32 -06:00
|
|
|
note: while trying to match `enum E {}`
|
|
|
|
--> $DIR/nonterminal-matching.rs:15:15
|
|
|
|
|
|
|
|
|
LL | macro n(a $nt_item b) {
|
|
|
|
| ^^^^^^^^
|
|
|
|
...
|
|
|
|
LL | complex_nonterminal!(enum E {});
|
|
|
|
| ------------------------------- in this macro invocation
|
2023-04-12 04:18:50 -05:00
|
|
|
= note: captured metavariables except for `:tt`, `:ident` and `:lifetime` cannot be compared to other tokens
|
2023-04-12 08:43:50 -05:00
|
|
|
= note: see <https://doc.rust-lang.org/nightly/reference/macros-by-example.html#forwarding-a-matched-fragment> for more information
|
2023-04-12 04:18:50 -05:00
|
|
|
= help: try using `:tt` instead in the macro definition
|
2021-02-13 13:52:25 -06:00
|
|
|
= note: this error originates in the macro `complex_nonterminal` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2018-03-24 08:00:44 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|