fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.1 KiB27 linesraw
1error: no rules expected the token `enum E {}`
2  --> $DIR/nonterminal-matching.rs:19:10
3   |
4LL |     macro n(a $nt_item b) {
5   |     --------------------- when calling this macro
6...
7LL |     n!(a $nt_item b);
8   |          ^^^^^^^^ no rules expected this token in macro call
9...
10LL | complex_nonterminal!(enum E {});
11   | ------------------------------- in this macro invocation
12   |
13note: while trying to match `enum E {}`
14  --> $DIR/nonterminal-matching.rs:15:15
15   |
16LL |     macro n(a $nt_item b) {
17   |               ^^^^^^^^
18...
19LL | complex_nonterminal!(enum E {});
20   | ------------------------------- in this macro invocation
21   = note: captured metavariables except for `:tt`, `:ident` and `:lifetime` cannot be compared to other tokens
22   = note: see <https://doc.rust-lang.org/nightly/reference/macros-by-example.html#forwarding-a-matched-fragment> for more information
23   = help: try using `:tt` instead in the macro definition
24   = note: this error originates in the macro `complex_nonterminal` (in Nightly builds, run with -Z macro-backtrace for more info)
25
26error: aborting due to previous error
27