Skip to content

Commit e50fd5a

Browse files
committed
Update stderr
1 parent 66b152c commit e50fd5a

File tree

1 file changed

+35
-59
lines changed

1 file changed

+35
-59
lines changed

src/test/ui/parser/attr-stmt-expr-attr-bad.stderr

+35-59
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,8 @@ LL | #[cfg(FALSE)] fn e() { let _ = #[attr] &mut #![attr] 0; }
136136
|
137137
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
138138

139-
error: attributes are not yet allowed on `if` expressions
140-
--> $DIR/attr-stmt-expr-attr-bad.rs:41:32
141-
|
142-
LL | #[cfg(FALSE)] fn e() { let _ = #[attr] if 0 {}; }
143-
| ^^^^^^^
144-
145139
error: expected `{`, found `#`
146-
--> $DIR/attr-stmt-expr-attr-bad.rs:43:37
140+
--> $DIR/attr-stmt-expr-attr-bad.rs:41:37
147141
|
148142
LL | #[cfg(FALSE)] fn e() { let _ = if 0 #[attr] {}; }
149143
| -- ^ --- help: try placing this code inside a block: `{ {}; }`
@@ -152,51 +146,45 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 #[attr] {}; }
152146
| this `if` expression has a condition, but no block
153147

154148
error: an inner attribute is not permitted in this context
155-
--> $DIR/attr-stmt-expr-attr-bad.rs:45:38
149+
--> $DIR/attr-stmt-expr-attr-bad.rs:43:38
156150
|
157151
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {#![attr]}; }
158152
| ^^^^^^^^
159153
|
160154
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
161155

162156
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#`
163-
--> $DIR/attr-stmt-expr-attr-bad.rs:47:40
157+
--> $DIR/attr-stmt-expr-attr-bad.rs:45:40
164158
|
165159
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} #[attr] else {}; }
166160
| ^ expected one of `.`, `;`, `?`, `else`, or an operator
167161

168162
error: expected `{`, found `#`
169-
--> $DIR/attr-stmt-expr-attr-bad.rs:49:45
163+
--> $DIR/attr-stmt-expr-attr-bad.rs:47:45
170164
|
171165
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] {}; }
172166
| ^ --- help: try placing this code inside a block: `{ {}; }`
173167
| |
174168
| expected `{`
175169

176170
error: an inner attribute is not permitted in this context
177-
--> $DIR/attr-stmt-expr-attr-bad.rs:51:46
171+
--> $DIR/attr-stmt-expr-attr-bad.rs:49:46
178172
|
179173
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else {#![attr]}; }
180174
| ^^^^^^^^
181175
|
182176
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
183177

184-
error: attributes are not yet allowed on `if` expressions
185-
--> $DIR/attr-stmt-expr-attr-bad.rs:53:45
186-
|
187-
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] if 0 {}; }
188-
| ^^^^^^^
189-
190178
error: expected `{`, found `#`
191-
--> $DIR/attr-stmt-expr-attr-bad.rs:53:45
179+
--> $DIR/attr-stmt-expr-attr-bad.rs:51:45
192180
|
193181
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] if 0 {}; }
194182
| ^ -------- help: try placing this code inside a block: `{ if 0 {}; }`
195183
| |
196184
| expected `{`
197185

198186
error: expected `{`, found `#`
199-
--> $DIR/attr-stmt-expr-attr-bad.rs:56:50
187+
--> $DIR/attr-stmt-expr-attr-bad.rs:53:50
200188
|
201189
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 #[attr] {}; }
202190
| -- ^ --- help: try placing this code inside a block: `{ {}; }`
@@ -205,21 +193,15 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 #[attr] {}; }
205193
| this `if` expression has a condition, but no block
206194

207195
error: an inner attribute is not permitted in this context
208-
--> $DIR/attr-stmt-expr-attr-bad.rs:58:51
196+
--> $DIR/attr-stmt-expr-attr-bad.rs:55:51
209197
|
210198
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 {#![attr]}; }
211199
| ^^^^^^^^
212200
|
213201
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
214202

215-
error: attributes are not yet allowed on `if` expressions
216-
--> $DIR/attr-stmt-expr-attr-bad.rs:60:32
217-
|
218-
LL | #[cfg(FALSE)] fn e() { let _ = #[attr] if let _ = 0 {}; }
219-
| ^^^^^^^
220-
221203
error: expected `{`, found `#`
222-
--> $DIR/attr-stmt-expr-attr-bad.rs:62:45
204+
--> $DIR/attr-stmt-expr-attr-bad.rs:57:45
223205
|
224206
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 #[attr] {}; }
225207
| -- ^ --- help: try placing this code inside a block: `{ {}; }`
@@ -228,51 +210,45 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 #[attr] {}; }
228210
| this `if` expression has a condition, but no block
229211

230212
error: an inner attribute is not permitted in this context
231-
--> $DIR/attr-stmt-expr-attr-bad.rs:64:46
213+
--> $DIR/attr-stmt-expr-attr-bad.rs:59:46
232214
|
233215
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {#![attr]}; }
234216
| ^^^^^^^^
235217
|
236218
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
237219

238220
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#`
239-
--> $DIR/attr-stmt-expr-attr-bad.rs:66:48
221+
--> $DIR/attr-stmt-expr-attr-bad.rs:61:48
240222
|
241223
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} #[attr] else {}; }
242224
| ^ expected one of `.`, `;`, `?`, `else`, or an operator
243225

244226
error: expected `{`, found `#`
245-
--> $DIR/attr-stmt-expr-attr-bad.rs:68:53
227+
--> $DIR/attr-stmt-expr-attr-bad.rs:63:53
246228
|
247229
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] {}; }
248230
| ^ --- help: try placing this code inside a block: `{ {}; }`
249231
| |
250232
| expected `{`
251233

252234
error: an inner attribute is not permitted in this context
253-
--> $DIR/attr-stmt-expr-attr-bad.rs:70:54
235+
--> $DIR/attr-stmt-expr-attr-bad.rs:65:54
254236
|
255237
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else {#![attr]}; }
256238
| ^^^^^^^^
257239
|
258240
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
259241

260-
error: attributes are not yet allowed on `if` expressions
261-
--> $DIR/attr-stmt-expr-attr-bad.rs:72:53
262-
|
263-
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] if let _ = 0 {}; }
264-
| ^^^^^^^
265-
266242
error: expected `{`, found `#`
267-
--> $DIR/attr-stmt-expr-attr-bad.rs:72:53
243+
--> $DIR/attr-stmt-expr-attr-bad.rs:67:53
268244
|
269245
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] if let _ = 0 {}; }
270246
| ^ ---------------- help: try placing this code inside a block: `{ if let _ = 0 {}; }`
271247
| |
272248
| expected `{`
273249

274250
error: expected `{`, found `#`
275-
--> $DIR/attr-stmt-expr-attr-bad.rs:75:66
251+
--> $DIR/attr-stmt-expr-attr-bad.rs:69:66
276252
|
277253
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 #[attr] {}; }
278254
| -- ^ --- help: try placing this code inside a block: `{ {}; }`
@@ -281,15 +257,15 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 #[attr] {}
281257
| this `if` expression has a condition, but no block
282258

283259
error: an inner attribute is not permitted in this context
284-
--> $DIR/attr-stmt-expr-attr-bad.rs:77:67
260+
--> $DIR/attr-stmt-expr-attr-bad.rs:71:67
285261
|
286262
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 {#![attr]}; }
287263
| ^^^^^^^^
288264
|
289265
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
290266

291267
error: an inner attribute is not permitted following an outer attribute
292-
--> $DIR/attr-stmt-expr-attr-bad.rs:80:32
268+
--> $DIR/attr-stmt-expr-attr-bad.rs:74:32
293269
|
294270
LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] let _ = 0; }
295271
| ------- ^^^^^^^^ not permitted following an outer attibute
@@ -299,7 +275,7 @@ LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] let _ = 0; }
299275
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
300276

301277
error: an inner attribute is not permitted following an outer attribute
302-
--> $DIR/attr-stmt-expr-attr-bad.rs:82:32
278+
--> $DIR/attr-stmt-expr-attr-bad.rs:76:32
303279
|
304280
LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] 0; }
305281
| ------- ^^^^^^^^ not permitted following an outer attibute
@@ -309,7 +285,7 @@ LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] 0; }
309285
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
310286

311287
error: an inner attribute is not permitted following an outer attribute
312-
--> $DIR/attr-stmt-expr-attr-bad.rs:84:32
288+
--> $DIR/attr-stmt-expr-attr-bad.rs:78:32
313289
|
314290
LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!(); }
315291
| ------- ^^^^^^^^ not permitted following an outer attibute
@@ -319,7 +295,7 @@ LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!(); }
319295
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
320296

321297
error: an inner attribute is not permitted following an outer attribute
322-
--> $DIR/attr-stmt-expr-attr-bad.rs:86:32
298+
--> $DIR/attr-stmt-expr-attr-bad.rs:80:32
323299
|
324300
LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo![]; }
325301
| ------- ^^^^^^^^ not permitted following an outer attibute
@@ -329,7 +305,7 @@ LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo![]; }
329305
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
330306

331307
error: an inner attribute is not permitted following an outer attribute
332-
--> $DIR/attr-stmt-expr-attr-bad.rs:88:32
308+
--> $DIR/attr-stmt-expr-attr-bad.rs:82:32
333309
|
334310
LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!{}; }
335311
| ------- ^^^^^^^^ not permitted following an outer attibute
@@ -339,89 +315,89 @@ LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!{}; }
339315
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
340316

341317
error[E0586]: inclusive range with no end
342-
--> $DIR/attr-stmt-expr-attr-bad.rs:94:35
318+
--> $DIR/attr-stmt-expr-attr-bad.rs:88:35
343319
|
344320
LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } }
345321
| ^^^ help: use `..` instead
346322
|
347323
= note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
348324

349325
error: expected one of `=>`, `if`, or `|`, found `#`
350-
--> $DIR/attr-stmt-expr-attr-bad.rs:94:38
326+
--> $DIR/attr-stmt-expr-attr-bad.rs:88:38
351327
|
352328
LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } }
353329
| ^ expected one of `=>`, `if`, or `|`
354330

355331
error[E0586]: inclusive range with no end
356-
--> $DIR/attr-stmt-expr-attr-bad.rs:97:35
332+
--> $DIR/attr-stmt-expr-attr-bad.rs:91:35
357333
|
358334
LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } }
359335
| ^^^ help: use `..` instead
360336
|
361337
= note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
362338

363339
error: expected one of `=>`, `if`, or `|`, found `#`
364-
--> $DIR/attr-stmt-expr-attr-bad.rs:97:38
340+
--> $DIR/attr-stmt-expr-attr-bad.rs:91:38
365341
|
366342
LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } }
367343
| ^ expected one of `=>`, `if`, or `|`
368344

369345
error: unexpected token: `#`
370-
--> $DIR/attr-stmt-expr-attr-bad.rs:100:39
346+
--> $DIR/attr-stmt-expr-attr-bad.rs:94:39
371347
|
372348
LL | #[cfg(FALSE)] fn e() { match 0 { 0..=-#[attr] 10 => () } }
373349
| ^
374350

375351
error[E0586]: inclusive range with no end
376-
--> $DIR/attr-stmt-expr-attr-bad.rs:102:35
352+
--> $DIR/attr-stmt-expr-attr-bad.rs:96:35
377353
|
378354
LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } }
379355
| ^^^ help: use `..` instead
380356
|
381357
= note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
382358

383359
error: expected one of `=>`, `if`, or `|`, found `#`
384-
--> $DIR/attr-stmt-expr-attr-bad.rs:102:38
360+
--> $DIR/attr-stmt-expr-attr-bad.rs:96:38
385361
|
386362
LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } }
387363
| ^ expected one of `=>`, `if`, or `|`
388364

389365
error: unexpected token: `#`
390-
--> $DIR/attr-stmt-expr-attr-bad.rs:106:34
366+
--> $DIR/attr-stmt-expr-attr-bad.rs:100:34
391367
|
392368
LL | #[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); }
393369
| ^
394370

395371
error: expected one of `.`, `;`, `?`, or an operator, found `#`
396-
--> $DIR/attr-stmt-expr-attr-bad.rs:106:34
372+
--> $DIR/attr-stmt-expr-attr-bad.rs:100:34
397373
|
398374
LL | #[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); }
399375
| ^ expected one of `.`, `;`, `?`, or an operator
400376

401377
error: unexpected token: `#`
402-
--> $DIR/attr-stmt-expr-attr-bad.rs:109:34
378+
--> $DIR/attr-stmt-expr-attr-bad.rs:103:34
403379
|
404380
LL | #[cfg(FALSE)] fn e() { let _ = x.#[attr]foo(); }
405381
| ^
406382

407383
error: expected one of `.`, `;`, `?`, or an operator, found `#`
408-
--> $DIR/attr-stmt-expr-attr-bad.rs:109:34
384+
--> $DIR/attr-stmt-expr-attr-bad.rs:103:34
409385
|
410386
LL | #[cfg(FALSE)] fn e() { let _ = x.#[attr]foo(); }
411387
| ^ expected one of `.`, `;`, `?`, or an operator
412388

413389
error: expected statement after outer attribute
414-
--> $DIR/attr-stmt-expr-attr-bad.rs:114:37
390+
--> $DIR/attr-stmt-expr-attr-bad.rs:108:37
415391
|
416392
LL | #[cfg(FALSE)] fn e() { { fn foo() { #[attr]; } } }
417393
| ^^^^^^^
418394

419395
error: expected statement after outer attribute
420-
--> $DIR/attr-stmt-expr-attr-bad.rs:116:37
396+
--> $DIR/attr-stmt-expr-attr-bad.rs:110:37
421397
|
422398
LL | #[cfg(FALSE)] fn e() { { fn foo() { #[attr] } } }
423399
| ^^^^^^^
424400

425-
error: aborting due to 57 previous errors
401+
error: aborting due to 53 previous errors
426402

427403
For more information about this error, try `rustc --explain E0586`.

0 commit comments

Comments
 (0)