@@ -16,182 +16,194 @@ error: unexpected token: $
1616LL | ( $$ $a:ident ) => {
1717 | ^
1818
19- note: `$$` and meta-variable expressions are not allowed inside macro parameter definitions
19+ note: `$$`, `$crate`, and meta-variable expressions are not allowed inside macro parameter definitions
2020 --> $DIR/syntax-errors.rs:53:8
2121 |
2222LL | ( $$ $a:ident ) => {
2323 | ^
2424
25+ error: unexpected token: crate
26+ --> $DIR/syntax-errors.rs:59:8
27+ |
28+ LL | ( $crate $a:ident ) => {
29+ | ^^^^^
30+
31+ note: `$$`, `$crate`, and meta-variable expressions are not allowed inside macro parameter definitions
32+ --> $DIR/syntax-errors.rs:59:8
33+ |
34+ LL | ( $crate $a:ident ) => {
35+ | ^^^^^
36+
2537error: unexpected token: a
26- --> $DIR/syntax-errors.rs:60 :19
38+ --> $DIR/syntax-errors.rs:66 :19
2739 |
2840LL | ${count() a b c}
2941 | ^
3042 |
3143note: meta-variable expression must not have trailing tokens
32- --> $DIR/syntax-errors.rs:60 :19
44+ --> $DIR/syntax-errors.rs:66 :19
3345 |
3446LL | ${count() a b c}
3547 | ^
3648
3749error: unexpected token: a
38- --> $DIR/syntax-errors.rs:63 :19
50+ --> $DIR/syntax-errors.rs:69 :19
3951 |
4052LL | ${count(i a b c)}
4153 | ^
4254 |
4355note: meta-variable expression must not have trailing tokens
44- --> $DIR/syntax-errors.rs:63 :19
56+ --> $DIR/syntax-errors.rs:69 :19
4557 |
4658LL | ${count(i a b c)}
4759 | ^
4860
4961error: unexpected token: a
50- --> $DIR/syntax-errors.rs:65 :22
62+ --> $DIR/syntax-errors.rs:71 :22
5163 |
5264LL | ${count(i, 1 a b c)}
5365 | ^
5466 |
5567note: meta-variable expression must not have trailing tokens
56- --> $DIR/syntax-errors.rs:65 :22
68+ --> $DIR/syntax-errors.rs:71 :22
5769 |
5870LL | ${count(i, 1 a b c)}
5971 | ^
6072
6173error: unexpected token: a
62- --> $DIR/syntax-errors.rs:67 :20
74+ --> $DIR/syntax-errors.rs:73 :20
6375 |
6476LL | ${count(i) a b c}
6577 | ^
6678 |
6779note: meta-variable expression must not have trailing tokens
68- --> $DIR/syntax-errors.rs:67 :20
80+ --> $DIR/syntax-errors.rs:73 :20
6981 |
7082LL | ${count(i) a b c}
7183 | ^
7284
7385error: unexpected token: a
74- --> $DIR/syntax-errors.rs:70 :21
86+ --> $DIR/syntax-errors.rs:76 :21
7587 |
7688LL | ${ignore(i) a b c}
7789 | ^
7890 |
7991note: meta-variable expression must not have trailing tokens
80- --> $DIR/syntax-errors.rs:70 :21
92+ --> $DIR/syntax-errors.rs:76 :21
8193 |
8294LL | ${ignore(i) a b c}
8395 | ^
8496
8597error: unexpected token: a
86- --> $DIR/syntax-errors.rs:72 :20
98+ --> $DIR/syntax-errors.rs:78 :20
8799 |
88100LL | ${ignore(i a b c)}
89101 | ^
90102 |
91103note: meta-variable expression must not have trailing tokens
92- --> $DIR/syntax-errors.rs:72 :20
104+ --> $DIR/syntax-errors.rs:78 :20
93105 |
94106LL | ${ignore(i a b c)}
95107 | ^
96108
97109error: unexpected token: a
98- --> $DIR/syntax-errors.rs:75 :19
110+ --> $DIR/syntax-errors.rs:81 :19
99111 |
100112LL | ${index() a b c}
101113 | ^
102114 |
103115note: meta-variable expression must not have trailing tokens
104- --> $DIR/syntax-errors.rs:75 :19
116+ --> $DIR/syntax-errors.rs:81 :19
105117 |
106118LL | ${index() a b c}
107119 | ^
108120
109121error: unexpected token: a
110- --> $DIR/syntax-errors.rs:77 :19
122+ --> $DIR/syntax-errors.rs:83 :19
111123 |
112124LL | ${index(1 a b c)}
113125 | ^
114126 |
115127note: meta-variable expression must not have trailing tokens
116- --> $DIR/syntax-errors.rs:77 :19
128+ --> $DIR/syntax-errors.rs:83 :19
117129 |
118130LL | ${index(1 a b c)}
119131 | ^
120132
121133error: unexpected token: a
122- --> $DIR/syntax-errors.rs:80 :19
134+ --> $DIR/syntax-errors.rs:86 :19
123135 |
124136LL | ${index() a b c}
125137 | ^
126138 |
127139note: meta-variable expression must not have trailing tokens
128- --> $DIR/syntax-errors.rs:80 :19
140+ --> $DIR/syntax-errors.rs:86 :19
129141 |
130142LL | ${index() a b c}
131143 | ^
132144
133145error: unexpected token: a
134- --> $DIR/syntax-errors.rs:82 :19
146+ --> $DIR/syntax-errors.rs:88 :19
135147 |
136148LL | ${index(1 a b c)}
137149 | ^
138150 |
139151note: meta-variable expression must not have trailing tokens
140- --> $DIR/syntax-errors.rs:82 :19
152+ --> $DIR/syntax-errors.rs:88 :19
141153 |
142154LL | ${index(1 a b c)}
143155 | ^
144156
145157error: meta-variable expression depth must be a literal
146- --> $DIR/syntax-errors.rs:89 :33
158+ --> $DIR/syntax-errors.rs:95 :33
147159 |
148160LL | ( $( $i:ident ),* ) => { ${ index(IDX) } };
149161 | ^^^^^
150162
151163error: unexpected token: {
152- --> $DIR/syntax-errors.rs:95 :8
164+ --> $DIR/syntax-errors.rs:101 :8
153165 |
154166LL | ( ${ length() } ) => {
155167 | ^^^^^^^^^^^^
156168
157- note: `$$` and meta-variable expressions are not allowed inside macro parameter definitions
158- --> $DIR/syntax-errors.rs:95 :8
169+ note: `$$`, `$crate`, and meta-variable expressions are not allowed inside macro parameter definitions
170+ --> $DIR/syntax-errors.rs:101 :8
159171 |
160172LL | ( ${ length() } ) => {
161173 | ^^^^^^^^^^^^
162174
163175error: expected one of: `*`, `+`, or `?`
164- --> $DIR/syntax-errors.rs:95 :8
176+ --> $DIR/syntax-errors.rs:101 :8
165177 |
166178LL | ( ${ length() } ) => {
167179 | ^^^^^^^^^^^^
168180
169181error: expected identifier
170- --> $DIR/syntax-errors.rs:102 :33
182+ --> $DIR/syntax-errors.rs:108 :33
171183 |
172184LL | ( $( $i:ident ),* ) => { ${ ignore() } };
173185 | ^^^^^^
174186
175187error: only unsuffixes integer literals are supported in meta-variable expressions
176- --> $DIR/syntax-errors.rs:108 :33
188+ --> $DIR/syntax-errors.rs:114 :33
177189 |
178190LL | ( $( $i:ident ),* ) => { ${ index(1u32) } };
179191 | ^^^^^
180192
181193error: meta-variable expression parameter must be wrapped in parentheses
182- --> $DIR/syntax-errors.rs:114 :33
194+ --> $DIR/syntax-errors.rs:120 :33
183195 |
184196LL | ( $( $i:ident ),* ) => { ${ count{i} } };
185197 | ^^^^^
186198
187199error: expected identifier
188- --> $DIR/syntax-errors.rs:120 :31
200+ --> $DIR/syntax-errors.rs:126 :31
189201 |
190202LL | ( $( $i:ident ),* ) => { ${ {} } };
191203 | ^^^^^^
192204
193205error: unrecognized meta-variable expression
194- --> $DIR/syntax-errors.rs:140 :33
206+ --> $DIR/syntax-errors.rs:146 :33
195207 |
196208LL | ( $( $i:ident ),* ) => { ${ aaaaaaaaaaaaaa(i) } };
197209 | ^^^^^^^^^^^^^^ help: supported expressions are count, ignore, index and length
@@ -231,7 +243,7 @@ LL | ( $( $i:ident ),* ) => { count($i) };
231243 | ^^
232244
233245error: expected expression, found `$`
234- --> $DIR/syntax-errors.rs:60 :9
246+ --> $DIR/syntax-errors.rs:66 :9
235247 |
236248LL | ${count() a b c}
237249 | ^ expected expression
@@ -242,7 +254,7 @@ LL | extra_garbage_after_metavar!(a);
242254 = note: this error originates in the macro `extra_garbage_after_metavar` (in Nightly builds, run with -Z macro-backtrace for more info)
243255
244256error: expected expression, found `$`
245- --> $DIR/syntax-errors.rs:89 :30
257+ --> $DIR/syntax-errors.rs:95 :30
246258 |
247259LL | ( $( $i:ident ),* ) => { ${ index(IDX) } };
248260 | ^ expected expression
@@ -253,7 +265,7 @@ LL | metavar_depth_is_not_literal!(a);
253265 = note: this error originates in the macro `metavar_depth_is_not_literal` (in Nightly builds, run with -Z macro-backtrace for more info)
254266
255267error: expected expression, found `$`
256- --> $DIR/syntax-errors.rs:102 :30
268+ --> $DIR/syntax-errors.rs:108 :30
257269 |
258270LL | ( $( $i:ident ),* ) => { ${ ignore() } };
259271 | ^ expected expression
@@ -264,7 +276,7 @@ LL | metavar_token_without_ident!(a);
264276 = note: this error originates in the macro `metavar_token_without_ident` (in Nightly builds, run with -Z macro-backtrace for more info)
265277
266278error: expected expression, found `$`
267- --> $DIR/syntax-errors.rs:108 :30
279+ --> $DIR/syntax-errors.rs:114 :30
268280 |
269281LL | ( $( $i:ident ),* ) => { ${ index(1u32) } };
270282 | ^ expected expression
@@ -275,7 +287,7 @@ LL | metavar_with_literal_suffix!(a);
275287 = note: this error originates in the macro `metavar_with_literal_suffix` (in Nightly builds, run with -Z macro-backtrace for more info)
276288
277289error: expected expression, found `$`
278- --> $DIR/syntax-errors.rs:114 :30
290+ --> $DIR/syntax-errors.rs:120 :30
279291 |
280292LL | ( $( $i:ident ),* ) => { ${ count{i} } };
281293 | ^ expected expression
@@ -286,7 +298,7 @@ LL | metavar_without_parens!(a);
286298 = note: this error originates in the macro `metavar_without_parens` (in Nightly builds, run with -Z macro-backtrace for more info)
287299
288300error: expected expression, found `$`
289- --> $DIR/syntax-errors.rs:120 :30
301+ --> $DIR/syntax-errors.rs:126 :30
290302 |
291303LL | ( $( $i:ident ),* ) => { ${ {} } };
292304 | ^ expected expression
@@ -297,19 +309,19 @@ LL | open_brackets_without_tokens!(a);
297309 = note: this error originates in the macro `open_brackets_without_tokens` (in Nightly builds, run with -Z macro-backtrace for more info)
298310
299311error: variable `foo` is not recognized in meta-variable expression
300- --> $DIR/syntax-errors.rs:127 :17
312+ --> $DIR/syntax-errors.rs:133 :17
301313 |
302314LL | ${count(foo)}
303315 | ^^^
304316
305317error: variable `bar` is not recognized in meta-variable expression
306- --> $DIR/syntax-errors.rs:134 :18
318+ --> $DIR/syntax-errors.rs:140 :18
307319 |
308320LL | ${ignore(bar)}
309321 | ^^^
310322
311323error: expected expression, found `$`
312- --> $DIR/syntax-errors.rs:140 :30
324+ --> $DIR/syntax-errors.rs:146 :30
313325 |
314326LL | ( $( $i:ident ),* ) => { ${ aaaaaaaaaaaaaa(i) } };
315327 | ^ expected expression
@@ -375,11 +387,11 @@ LL | no_curly__rhs_dollar__no_round!(a);
375387 = note: this error originates in the macro `no_curly__rhs_dollar__no_round` (in Nightly builds, run with -Z macro-backtrace for more info)
376388
377389error[E0425]: cannot find value `a` in this scope
378- --> $DIR/syntax-errors.rs:153 :37
390+ --> $DIR/syntax-errors.rs:159 :37
379391 |
380392LL | no_curly__rhs_dollar__no_round!(a);
381393 | ^ not found in this scope
382394
383- error: aborting due to 40 previous errors
395+ error: aborting due to 41 previous errors
384396
385397For more information about this error, try `rustc --explain E0425`.
0 commit comments