@@ -41,178 +41,195 @@ LL | ( $( $i:ident ),* ) => { ${ index(1u32) } };
4141 | ^^^^^
4242
4343error: meta-variable expression parameter must be wrapped in parentheses
44- --> $DIR/syntax-errors.rs:32:34
44+ --> $DIR/syntax-errors.rs:32:33
4545 |
46- LL | ( $( $i:ident ),* ) => { ${ count } };
47- | ^^^^^
46+ LL | ( $( $i:ident ),* ) => { ${ count } };
47+ | ^^^^^
4848
4949error: meta-variable expression parameter must be wrapped in parentheses
5050 --> $DIR/syntax-errors.rs:49:33
5151 |
5252LL | ( $( $i:ident ),* ) => { ${ count{i} } };
5353 | ^^^^^
5454
55+ error: expected an identifier
56+ --> $DIR/syntax-errors.rs:54:23
57+ |
58+ LL | () => { ${ignore($123)} }
59+ | ^^^ not a valid identifier
60+ |
61+ = note: `ignore` takes a metavariable argument
62+
5563error: unexpected token: a
56- --> $DIR/syntax-errors.rs:61 :19
64+ --> $DIR/syntax-errors.rs:66 :19
5765 |
5866LL | ${count() a b c}
5967 | ^
6068 |
6169note: meta-variable expression must not have trailing tokens
62- --> $DIR/syntax-errors.rs:61 :19
70+ --> $DIR/syntax-errors.rs:66 :19
6371 |
6472LL | ${count() a b c}
6573 | ^
6674
6775error: unexpected token: a
68- --> $DIR/syntax-errors.rs:63 :20
76+ --> $DIR/syntax-errors.rs:68 :20
6977 |
7078LL | ${count($i a b c)}
7179 | ^
7280 |
7381note: meta-variable expression must not have trailing tokens
74- --> $DIR/syntax-errors.rs:63 :20
82+ --> $DIR/syntax-errors.rs:68 :20
7583 |
7684LL | ${count($i a b c)}
7785 | ^
7886
7987error: unexpected token: a
80- --> $DIR/syntax-errors.rs:65 :23
88+ --> $DIR/syntax-errors.rs:70 :23
8189 |
8290LL | ${count($i, 1 a b c)}
8391 | ^
8492 |
8593note: meta-variable expression must not have trailing tokens
86- --> $DIR/syntax-errors.rs:65 :23
94+ --> $DIR/syntax-errors.rs:70 :23
8795 |
8896LL | ${count($i, 1 a b c)}
8997 | ^
9098
9199error: unexpected token: a
92- --> $DIR/syntax-errors.rs:67 :21
100+ --> $DIR/syntax-errors.rs:72 :21
93101 |
94102LL | ${count($i) a b c}
95103 | ^
96104 |
97105note: meta-variable expression must not have trailing tokens
98- --> $DIR/syntax-errors.rs:67 :21
106+ --> $DIR/syntax-errors.rs:72 :21
99107 |
100108LL | ${count($i) a b c}
101109 | ^
102110
103111error: unexpected token: a
104- --> $DIR/syntax-errors.rs:70 :22
112+ --> $DIR/syntax-errors.rs:75 :22
105113 |
106114LL | ${ignore($i) a b c}
107115 | ^
108116 |
109117note: meta-variable expression must not have trailing tokens
110- --> $DIR/syntax-errors.rs:70 :22
118+ --> $DIR/syntax-errors.rs:75 :22
111119 |
112120LL | ${ignore($i) a b c}
113121 | ^
114122
115123error: unexpected token: a
116- --> $DIR/syntax-errors.rs:72 :21
124+ --> $DIR/syntax-errors.rs:77 :21
117125 |
118126LL | ${ignore($i a b c)}
119127 | ^
120128 |
121129note: meta-variable expression must not have trailing tokens
122- --> $DIR/syntax-errors.rs:72 :21
130+ --> $DIR/syntax-errors.rs:77 :21
123131 |
124132LL | ${ignore($i a b c)}
125133 | ^
126134
127135error: unexpected token: a
128- --> $DIR/syntax-errors.rs:75 :19
136+ --> $DIR/syntax-errors.rs:80 :19
129137 |
130138LL | ${index() a b c}
131139 | ^
132140 |
133141note: meta-variable expression must not have trailing tokens
134- --> $DIR/syntax-errors.rs:75 :19
142+ --> $DIR/syntax-errors.rs:80 :19
135143 |
136144LL | ${index() a b c}
137145 | ^
138146
139147error: unexpected token: a
140- --> $DIR/syntax-errors.rs:77 :19
148+ --> $DIR/syntax-errors.rs:82 :19
141149 |
142150LL | ${index(1 a b c)}
143151 | ^
144152 |
145153note: meta-variable expression must not have trailing tokens
146- --> $DIR/syntax-errors.rs:77 :19
154+ --> $DIR/syntax-errors.rs:82 :19
147155 |
148156LL | ${index(1 a b c)}
149157 | ^
150158
151159error: unexpected token: a
152- --> $DIR/syntax-errors.rs:80 :19
160+ --> $DIR/syntax-errors.rs:85 :19
153161 |
154162LL | ${index() a b c}
155163 | ^
156164 |
157165note: meta-variable expression must not have trailing tokens
158- --> $DIR/syntax-errors.rs:80 :19
166+ --> $DIR/syntax-errors.rs:85 :19
159167 |
160168LL | ${index() a b c}
161169 | ^
162170
163171error: unexpected token: a
164- --> $DIR/syntax-errors.rs:82 :19
172+ --> $DIR/syntax-errors.rs:87 :19
165173 |
166174LL | ${index(1 a b c)}
167175 | ^
168176 |
169177note: meta-variable expression must not have trailing tokens
170- --> $DIR/syntax-errors.rs:82 :19
178+ --> $DIR/syntax-errors.rs:87 :19
171179 |
172180LL | ${index(1 a b c)}
173181 | ^
174182
175183error: meta-variable expression depth must be a literal
176- --> $DIR/syntax-errors.rs:89 :33
184+ --> $DIR/syntax-errors.rs:94 :33
177185 |
178186LL | ( $( $i:ident ),* ) => { ${ index(IDX) } };
179187 | ^^^^^
180188
181189error: meta-variables within meta-variable expressions must be referenced using a dollar sign
182- --> $DIR/syntax-errors.rs:95 :11
190+ --> $DIR/syntax-errors.rs:100 :11
183191 |
184192LL | ${count(foo)}
185193 | ^^^^^
186194
187195error: meta-variables within meta-variable expressions must be referenced using a dollar sign
188- --> $DIR/syntax-errors.rs:102 :11
196+ --> $DIR/syntax-errors.rs:107 :11
189197 |
190198LL | ${ignore(bar)}
191199 | ^^^^^^
192200
193201error: unrecognized meta-variable expression
194- --> $DIR/syntax-errors.rs:108 :33
202+ --> $DIR/syntax-errors.rs:113 :33
195203 |
196204LL | ( $( $i:ident ),* ) => { ${ aaaaaaaaaaaaaa(i) } };
197205 | ^^^^^^^^^^^^^^ help: supported expressions are count, ignore, index and len
198206
199- error: expected identifier or string literal
200- --> $DIR/syntax-errors.rs:38:15
207+ error: expected an identifier
208+ --> $DIR/syntax-errors.rs:38:14
209+ |
210+ LL | () => { ${} };
211+ | ^^
201212 |
202- LL | () => { ${} };
203- | ^^
213+ = note: expected a metavariable expression name: `${expr( /* ... */ )}`
214+ = note: valid metavariable expressions are `count`, `ignore`, `index`, `len`, and `concat`
204215
205- error: expected identifier, found `"hi"`
216+ error: expected an identifier
206217 --> $DIR/syntax-errors.rs:44:17
207218 |
208219LL | () => { ${ "hi" } };
209- | ^^^^ help: try removing `"hi"`
220+ | ^^^^ not a valid identifier
221+ |
222+ = note: expected a metavariable expression name: `${expr( /* ... */ )}`
223+ = note: valid metavariable expressions are `count`, `ignore`, `index`, `len`, and `concat`
210224
211- error: expected identifier or string literal
212- --> $DIR/syntax-errors.rs:55 :33
225+ error: expected an identifier
226+ --> $DIR/syntax-errors.rs:60 :33
213227 |
214228LL | ( $( $i:ident ),* ) => { ${ {} } };
215- | ^^
229+ | ^^ not a valid identifier
230+ |
231+ = note: expected a metavariable expression name: `${expr( /* ... */ )}`
232+ = note: valid metavariable expressions are `count`, `ignore`, `index`, `len`, and `concat`
216233
217- error: aborting due to 24 previous errors
234+ error: aborting due to 25 previous errors
218235
0 commit comments