@@ -41,178 +41,195 @@ LL | ( $( $i:ident ),* ) => { ${ index(1u32) } };
41
41
| ^^^^^
42
42
43
43
error: meta-variable expression parameter must be wrapped in parentheses
44
- --> $DIR/syntax-errors.rs:32:34
44
+ --> $DIR/syntax-errors.rs:32:33
45
45
|
46
- LL | ( $( $i:ident ),* ) => { ${ count } };
47
- | ^^^^^
46
+ LL | ( $( $i:ident ),* ) => { ${ count } };
47
+ | ^^^^^
48
48
49
49
error: meta-variable expression parameter must be wrapped in parentheses
50
50
--> $DIR/syntax-errors.rs:49:33
51
51
|
52
52
LL | ( $( $i:ident ),* ) => { ${ count{i} } };
53
53
| ^^^^^
54
54
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
+
55
63
error: unexpected token: a
56
- --> $DIR/syntax-errors.rs:61 :19
64
+ --> $DIR/syntax-errors.rs:66 :19
57
65
|
58
66
LL | ${count() a b c}
59
67
| ^
60
68
|
61
69
note: meta-variable expression must not have trailing tokens
62
- --> $DIR/syntax-errors.rs:61 :19
70
+ --> $DIR/syntax-errors.rs:66 :19
63
71
|
64
72
LL | ${count() a b c}
65
73
| ^
66
74
67
75
error: unexpected token: a
68
- --> $DIR/syntax-errors.rs:63 :20
76
+ --> $DIR/syntax-errors.rs:68 :20
69
77
|
70
78
LL | ${count($i a b c)}
71
79
| ^
72
80
|
73
81
note: meta-variable expression must not have trailing tokens
74
- --> $DIR/syntax-errors.rs:63 :20
82
+ --> $DIR/syntax-errors.rs:68 :20
75
83
|
76
84
LL | ${count($i a b c)}
77
85
| ^
78
86
79
87
error: unexpected token: a
80
- --> $DIR/syntax-errors.rs:65 :23
88
+ --> $DIR/syntax-errors.rs:70 :23
81
89
|
82
90
LL | ${count($i, 1 a b c)}
83
91
| ^
84
92
|
85
93
note: meta-variable expression must not have trailing tokens
86
- --> $DIR/syntax-errors.rs:65 :23
94
+ --> $DIR/syntax-errors.rs:70 :23
87
95
|
88
96
LL | ${count($i, 1 a b c)}
89
97
| ^
90
98
91
99
error: unexpected token: a
92
- --> $DIR/syntax-errors.rs:67 :21
100
+ --> $DIR/syntax-errors.rs:72 :21
93
101
|
94
102
LL | ${count($i) a b c}
95
103
| ^
96
104
|
97
105
note: meta-variable expression must not have trailing tokens
98
- --> $DIR/syntax-errors.rs:67 :21
106
+ --> $DIR/syntax-errors.rs:72 :21
99
107
|
100
108
LL | ${count($i) a b c}
101
109
| ^
102
110
103
111
error: unexpected token: a
104
- --> $DIR/syntax-errors.rs:70 :22
112
+ --> $DIR/syntax-errors.rs:75 :22
105
113
|
106
114
LL | ${ignore($i) a b c}
107
115
| ^
108
116
|
109
117
note: meta-variable expression must not have trailing tokens
110
- --> $DIR/syntax-errors.rs:70 :22
118
+ --> $DIR/syntax-errors.rs:75 :22
111
119
|
112
120
LL | ${ignore($i) a b c}
113
121
| ^
114
122
115
123
error: unexpected token: a
116
- --> $DIR/syntax-errors.rs:72 :21
124
+ --> $DIR/syntax-errors.rs:77 :21
117
125
|
118
126
LL | ${ignore($i a b c)}
119
127
| ^
120
128
|
121
129
note: meta-variable expression must not have trailing tokens
122
- --> $DIR/syntax-errors.rs:72 :21
130
+ --> $DIR/syntax-errors.rs:77 :21
123
131
|
124
132
LL | ${ignore($i a b c)}
125
133
| ^
126
134
127
135
error: unexpected token: a
128
- --> $DIR/syntax-errors.rs:75 :19
136
+ --> $DIR/syntax-errors.rs:80 :19
129
137
|
130
138
LL | ${index() a b c}
131
139
| ^
132
140
|
133
141
note: meta-variable expression must not have trailing tokens
134
- --> $DIR/syntax-errors.rs:75 :19
142
+ --> $DIR/syntax-errors.rs:80 :19
135
143
|
136
144
LL | ${index() a b c}
137
145
| ^
138
146
139
147
error: unexpected token: a
140
- --> $DIR/syntax-errors.rs:77 :19
148
+ --> $DIR/syntax-errors.rs:82 :19
141
149
|
142
150
LL | ${index(1 a b c)}
143
151
| ^
144
152
|
145
153
note: meta-variable expression must not have trailing tokens
146
- --> $DIR/syntax-errors.rs:77 :19
154
+ --> $DIR/syntax-errors.rs:82 :19
147
155
|
148
156
LL | ${index(1 a b c)}
149
157
| ^
150
158
151
159
error: unexpected token: a
152
- --> $DIR/syntax-errors.rs:80 :19
160
+ --> $DIR/syntax-errors.rs:85 :19
153
161
|
154
162
LL | ${index() a b c}
155
163
| ^
156
164
|
157
165
note: meta-variable expression must not have trailing tokens
158
- --> $DIR/syntax-errors.rs:80 :19
166
+ --> $DIR/syntax-errors.rs:85 :19
159
167
|
160
168
LL | ${index() a b c}
161
169
| ^
162
170
163
171
error: unexpected token: a
164
- --> $DIR/syntax-errors.rs:82 :19
172
+ --> $DIR/syntax-errors.rs:87 :19
165
173
|
166
174
LL | ${index(1 a b c)}
167
175
| ^
168
176
|
169
177
note: meta-variable expression must not have trailing tokens
170
- --> $DIR/syntax-errors.rs:82 :19
178
+ --> $DIR/syntax-errors.rs:87 :19
171
179
|
172
180
LL | ${index(1 a b c)}
173
181
| ^
174
182
175
183
error: meta-variable expression depth must be a literal
176
- --> $DIR/syntax-errors.rs:89 :33
184
+ --> $DIR/syntax-errors.rs:94 :33
177
185
|
178
186
LL | ( $( $i:ident ),* ) => { ${ index(IDX) } };
179
187
| ^^^^^
180
188
181
189
error: 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
183
191
|
184
192
LL | ${count(foo)}
185
193
| ^^^^^
186
194
187
195
error: 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
189
197
|
190
198
LL | ${ignore(bar)}
191
199
| ^^^^^^
192
200
193
201
error: unrecognized meta-variable expression
194
- --> $DIR/syntax-errors.rs:108 :33
202
+ --> $DIR/syntax-errors.rs:113 :33
195
203
|
196
204
LL | ( $( $i:ident ),* ) => { ${ aaaaaaaaaaaaaa(i) } };
197
205
| ^^^^^^^^^^^^^^ help: supported expressions are count, ignore, index and len
198
206
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
+ | ^^
201
212
|
202
- LL | () => { ${} };
203
- | ^^
213
+ = note: expected a metavariable expression name: `${expr( /* ... */ )}`
214
+ = note: valid metavariable expressions are `count`, `ignore`, `index`, `len`, and `concat`
204
215
205
- error: expected identifier, found `"hi"`
216
+ error: expected an identifier
206
217
--> $DIR/syntax-errors.rs:44:17
207
218
|
208
219
LL | () => { ${ "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`
210
224
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
213
227
|
214
228
LL | ( $( $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`
216
233
217
- error: aborting due to 24 previous errors
234
+ error: aborting due to 25 previous errors
218
235
0 commit comments