]> git.proxmox.com Git - rustc.git/blob - tests/ui-fulldeps/session-diagnostic/subdiagnostic-derive.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui-fulldeps / session-diagnostic / subdiagnostic-derive.stderr
1 error: label without `#[primary_span]` field
2 --> $DIR/subdiagnostic-derive.rs:47:1
3 |
4 LL | / #[label(parse_add_paren)]
5 LL | |
6 LL | | struct C {
7 LL | | var: String,
8 LL | | }
9 | |_^
10
11 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
12 --> $DIR/subdiagnostic-derive.rs:54:1
13 |
14 LL | #[label]
15 | ^^^^^^^^
16
17 error: `#[foo]` is not a valid attribute
18 --> $DIR/subdiagnostic-derive.rs:63:1
19 |
20 LL | #[foo]
21 | ^^^^^^
22
23 error: `#[label = ...]` is not a valid attribute
24 --> $DIR/subdiagnostic-derive.rs:73:1
25 |
26 LL | #[label = "..."]
27 | ^^^^^^^^^^^^^^^^
28
29 error: `#[label(bug = ...)]` is not a valid attribute
30 --> $DIR/subdiagnostic-derive.rs:82:9
31 |
32 LL | #[label(bug = "...")]
33 | ^^^^^^^^^^^
34
35 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
36 --> $DIR/subdiagnostic-derive.rs:82:1
37 |
38 LL | #[label(bug = "...")]
39 | ^^^^^^^^^^^^^^^^^^^^^
40
41 error: `#[label("...")]` is not a valid attribute
42 --> $DIR/subdiagnostic-derive.rs:92:9
43 |
44 LL | #[label("...")]
45 | ^^^^^
46
47 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
48 --> $DIR/subdiagnostic-derive.rs:92:1
49 |
50 LL | #[label("...")]
51 | ^^^^^^^^^^^^^^^
52
53 error: `#[label(slug = ...)]` is not a valid attribute
54 --> $DIR/subdiagnostic-derive.rs:102:9
55 |
56 LL | #[label(slug = 4)]
57 | ^^^^^^^^
58
59 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
60 --> $DIR/subdiagnostic-derive.rs:102:1
61 |
62 LL | #[label(slug = 4)]
63 | ^^^^^^^^^^^^^^^^^^
64
65 error: `#[label(slug(...))]` is not a valid attribute
66 --> $DIR/subdiagnostic-derive.rs:112:9
67 |
68 LL | #[label(slug("..."))]
69 | ^^^^^^^^^^^
70
71 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
72 --> $DIR/subdiagnostic-derive.rs:112:1
73 |
74 LL | #[label(slug("..."))]
75 | ^^^^^^^^^^^^^^^^^^^^^
76
77 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
78 --> $DIR/subdiagnostic-derive.rs:132:1
79 |
80 LL | #[label()]
81 | ^^^^^^^^^^
82
83 error: `#[label(code = ...)]` is not a valid attribute
84 --> $DIR/subdiagnostic-derive.rs:141:26
85 |
86 LL | #[label(parse_add_paren, code = "...")]
87 | ^^^^^^^^^^^^
88
89 error: `#[label(applicability = ...)]` is not a valid attribute
90 --> $DIR/subdiagnostic-derive.rs:150:26
91 |
92 LL | #[label(parse_add_paren, applicability = "machine-applicable")]
93 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
94
95 error: unsupported type attribute for subdiagnostic enum
96 --> $DIR/subdiagnostic-derive.rs:159:1
97 |
98 LL | #[foo]
99 | ^^^^^^
100
101 error: `#[bar]` is not a valid attribute
102 --> $DIR/subdiagnostic-derive.rs:173:5
103 |
104 LL | #[bar]
105 | ^^^^^^
106
107 error: `#[bar = ...]` is not a valid attribute
108 --> $DIR/subdiagnostic-derive.rs:185:5
109 |
110 LL | #[bar = "..."]
111 | ^^^^^^^^^^^^^^
112
113 error: `#[bar = ...]` is not a valid attribute
114 --> $DIR/subdiagnostic-derive.rs:197:5
115 |
116 LL | #[bar = 4]
117 | ^^^^^^^^^^
118
119 error: `#[bar(...)]` is not a valid attribute
120 --> $DIR/subdiagnostic-derive.rs:209:5
121 |
122 LL | #[bar("...")]
123 | ^^^^^^^^^^^^^
124
125 error: `#[label(code = ...)]` is not a valid attribute
126 --> $DIR/subdiagnostic-derive.rs:221:13
127 |
128 LL | #[label(code = "...")]
129 | ^^^^^^^^^^^^
130
131 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
132 --> $DIR/subdiagnostic-derive.rs:221:5
133 |
134 LL | #[label(code = "...")]
135 | ^^^^^^^^^^^^^^^^^^^^^^
136
137 error: the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
138 --> $DIR/subdiagnostic-derive.rs:250:5
139 |
140 LL | #[primary_span]
141 | ^^^^^^^^^^^^^^^
142
143 error: label without `#[primary_span]` field
144 --> $DIR/subdiagnostic-derive.rs:247:1
145 |
146 LL | / #[label(parse_add_paren)]
147 LL | |
148 LL | | struct W {
149 LL | | #[primary_span]
150 LL | |
151 LL | | span: String,
152 LL | | }
153 | |_^
154
155 error: `#[applicability]` is only valid on suggestions
156 --> $DIR/subdiagnostic-derive.rs:260:5
157 |
158 LL | #[applicability]
159 | ^^^^^^^^^^^^^^^^
160
161 error: `#[bar]` is not a valid attribute
162 --> $DIR/subdiagnostic-derive.rs:270:5
163 |
164 LL | #[bar]
165 | ^^^^^^
166 |
167 = help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
168
169 error: `#[bar = ...]` is not a valid attribute
170 --> $DIR/subdiagnostic-derive.rs:281:5
171 |
172 LL | #[bar = "..."]
173 | ^^^^^^^^^^^^^^
174
175 error: `#[bar(...)]` is not a valid attribute
176 --> $DIR/subdiagnostic-derive.rs:292:5
177 |
178 LL | #[bar("...")]
179 | ^^^^^^^^^^^^^
180 |
181 = help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
182
183 error: unexpected unsupported untagged union
184 --> $DIR/subdiagnostic-derive.rs:308:1
185 |
186 LL | / union AC {
187 LL | |
188 LL | | span: u32,
189 LL | | b: u64,
190 LL | | }
191 | |_^
192
193 error: `#[label(parse_add_paren)]` is not a valid attribute
194 --> $DIR/subdiagnostic-derive.rs:323:26
195 |
196 LL | #[label(parse_add_paren, parse_add_paren)]
197 | ^^^^^^^^^^^^^^^
198 |
199 = help: a diagnostic slug must be the first argument to the attribute
200
201 error: specified multiple times
202 --> $DIR/subdiagnostic-derive.rs:336:5
203 |
204 LL | #[primary_span]
205 | ^^^^^^^^^^^^^^^
206 |
207 note: previously specified here
208 --> $DIR/subdiagnostic-derive.rs:333:5
209 |
210 LL | #[primary_span]
211 | ^^^^^^^^^^^^^^^
212
213 error: subdiagnostic kind not specified
214 --> $DIR/subdiagnostic-derive.rs:342:8
215 |
216 LL | struct AG {
217 | ^^
218
219 error: specified multiple times
220 --> $DIR/subdiagnostic-derive.rs:379:45
221 |
222 LL | #[suggestion(parse_add_paren, code = "...", code = "...")]
223 | ^^^^^^^^^^^^
224 |
225 note: previously specified here
226 --> $DIR/subdiagnostic-derive.rs:379:31
227 |
228 LL | #[suggestion(parse_add_paren, code = "...", code = "...")]
229 | ^^^^^^^^^^^^
230
231 error: specified multiple times
232 --> $DIR/subdiagnostic-derive.rs:397:5
233 |
234 LL | #[applicability]
235 | ^^^^^^^^^^^^^^^^
236 |
237 note: previously specified here
238 --> $DIR/subdiagnostic-derive.rs:394:5
239 |
240 LL | #[applicability]
241 | ^^^^^^^^^^^^^^^^
242
243 error: the `#[applicability]` attribute can only be applied to fields of type `Applicability`
244 --> $DIR/subdiagnostic-derive.rs:407:5
245 |
246 LL | #[applicability]
247 | ^^^^^^^^^^^^^^^^
248
249 error: suggestion without `code = "..."`
250 --> $DIR/subdiagnostic-derive.rs:420:1
251 |
252 LL | #[suggestion(parse_add_paren)]
253 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
254
255 error: invalid applicability
256 --> $DIR/subdiagnostic-derive.rs:430:45
257 |
258 LL | #[suggestion(parse_add_paren, code = "...", applicability = "foo")]
259 | ^^^^^^^^^^^^^^^^^^^^^
260
261 error: suggestion without `#[primary_span]` field
262 --> $DIR/subdiagnostic-derive.rs:448:1
263 |
264 LL | / #[suggestion(parse_add_paren, code = "...")]
265 LL | |
266 LL | | struct AR {
267 LL | | var: String,
268 LL | | }
269 | |_^
270
271 error: unsupported type attribute for subdiagnostic enum
272 --> $DIR/subdiagnostic-derive.rs:462:1
273 |
274 LL | #[label]
275 | ^^^^^^^^
276
277 error: `var` doesn't refer to a field on this type
278 --> $DIR/subdiagnostic-derive.rs:482:38
279 |
280 LL | #[suggestion(parse_add_paren, code = "{var}", applicability = "machine-applicable")]
281 | ^^^^^^^
282
283 error: `var` doesn't refer to a field on this type
284 --> $DIR/subdiagnostic-derive.rs:501:42
285 |
286 LL | #[suggestion(parse_add_paren, code = "{var}", applicability = "machine-applicable")]
287 | ^^^^^^^
288
289 error: `#[suggestion_part]` is not a valid attribute
290 --> $DIR/subdiagnostic-derive.rs:524:5
291 |
292 LL | #[suggestion_part]
293 | ^^^^^^^^^^^^^^^^^^
294 |
295 = help: `#[suggestion_part(...)]` is only valid in multipart suggestions, use `#[primary_span]` instead
296
297 error: `#[suggestion_part(...)]` is not a valid attribute
298 --> $DIR/subdiagnostic-derive.rs:527:5
299 |
300 LL | #[suggestion_part(code = "...")]
301 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
302 |
303 = help: `#[suggestion_part(...)]` is only valid in multipart suggestions
304
305 error: suggestion without `#[primary_span]` field
306 --> $DIR/subdiagnostic-derive.rs:521:1
307 |
308 LL | / #[suggestion(parse_add_paren, code = "...")]
309 LL | |
310 LL | | struct BA {
311 LL | | #[suggestion_part]
312 ... |
313 LL | | var: String,
314 LL | | }
315 | |_^
316
317 error: `#[multipart_suggestion(code = ...)]` is not a valid attribute
318 --> $DIR/subdiagnostic-derive.rs:536:41
319 |
320 LL | #[multipart_suggestion(parse_add_paren, code = "...", applicability = "machine-applicable")]
321 | ^^^^^^^^^^^^
322 |
323 = help: only `style` and `applicability` are valid nested attributes
324
325 error: multipart suggestion without any `#[suggestion_part(...)]` fields
326 --> $DIR/subdiagnostic-derive.rs:536:1
327 |
328 LL | / #[multipart_suggestion(parse_add_paren, code = "...", applicability = "machine-applicable")]
329 LL | |
330 LL | |
331 LL | | struct BBa {
332 LL | | var: String,
333 LL | | }
334 | |_^
335
336 error: `#[suggestion_part(...)]` attribute without `code = "..."`
337 --> $DIR/subdiagnostic-derive.rs:546:5
338 |
339 LL | #[suggestion_part]
340 | ^^^^^^^^^^^^^^^^^^
341
342 error: `#[suggestion_part(...)]` attribute without `code = "..."`
343 --> $DIR/subdiagnostic-derive.rs:554:5
344 |
345 LL | #[suggestion_part()]
346 | ^^^^^^^^^^^^^^^^^^^^
347
348 error: `#[primary_span]` is not a valid attribute
349 --> $DIR/subdiagnostic-derive.rs:563:5
350 |
351 LL | #[primary_span]
352 | ^^^^^^^^^^^^^^^
353 |
354 = help: multipart suggestions use one or more `#[suggestion_part]`s rather than one `#[primary_span]`
355
356 error: multipart suggestion without any `#[suggestion_part(...)]` fields
357 --> $DIR/subdiagnostic-derive.rs:560:1
358 |
359 LL | / #[multipart_suggestion(parse_add_paren)]
360 LL | |
361 LL | | struct BC {
362 LL | | #[primary_span]
363 LL | |
364 LL | | span: Span,
365 LL | | }
366 | |_^
367
368 error: `#[suggestion_part(...)]` attribute without `code = "..."`
369 --> $DIR/subdiagnostic-derive.rs:571:5
370 |
371 LL | #[suggestion_part]
372 | ^^^^^^^^^^^^^^^^^^
373
374 error: `#[suggestion_part(...)]` attribute without `code = "..."`
375 --> $DIR/subdiagnostic-derive.rs:574:5
376 |
377 LL | #[suggestion_part()]
378 | ^^^^^^^^^^^^^^^^^^^^
379
380 error: `#[suggestion_part(foo = ...)]` is not a valid attribute
381 --> $DIR/subdiagnostic-derive.rs:577:23
382 |
383 LL | #[suggestion_part(foo = "bar")]
384 | ^^^^^^^^^^^
385 |
386 = help: `code` is the only valid nested attribute
387
388 error: the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
389 --> $DIR/subdiagnostic-derive.rs:580:5
390 |
391 LL | #[suggestion_part(code = "...")]
392 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
393
394 error: the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
395 --> $DIR/subdiagnostic-derive.rs:583:5
396 |
397 LL | #[suggestion_part()]
398 | ^^^^^^^^^^^^^^^^^^^^
399
400 error: specified multiple times
401 --> $DIR/subdiagnostic-derive.rs:591:37
402 |
403 LL | #[suggestion_part(code = "...", code = ",,,")]
404 | ^^^^^^^^^^^^
405 |
406 note: previously specified here
407 --> $DIR/subdiagnostic-derive.rs:591:23
408 |
409 LL | #[suggestion_part(code = "...", code = ",,,")]
410 | ^^^^^^^^^^^^
411
412 error: `#[applicability]` has no effect if all `#[suggestion]`/`#[multipart_suggestion]` attributes have a static `applicability = "..."`
413 --> $DIR/subdiagnostic-derive.rs:620:5
414 |
415 LL | #[applicability]
416 | ^^^^^^^^^^^^^^^^
417
418 error: expected exactly one string literal for `code = ...`
419 --> $DIR/subdiagnostic-derive.rs:668:23
420 |
421 LL | #[suggestion_part(code("foo"))]
422 | ^^^^^^^^^^^
423
424 error: expected exactly one string literal for `code = ...`
425 --> $DIR/subdiagnostic-derive.rs:677:23
426 |
427 LL | #[suggestion_part(code("foo", "bar"))]
428 | ^^^^^^^^^^^^^^^^^^
429
430 error: expected exactly one string literal for `code = ...`
431 --> $DIR/subdiagnostic-derive.rs:686:23
432 |
433 LL | #[suggestion_part(code(3))]
434 | ^^^^^^^
435
436 error: expected exactly one string literal for `code = ...`
437 --> $DIR/subdiagnostic-derive.rs:695:23
438 |
439 LL | #[suggestion_part(code())]
440 | ^^^^^^
441
442 error: `code = "..."`/`code(...)` must contain only string literals
443 --> $DIR/subdiagnostic-derive.rs:704:23
444 |
445 LL | #[suggestion_part(code = 3)]
446 | ^^^^^^^^
447
448 error: specified multiple times
449 --> $DIR/subdiagnostic-derive.rs:746:60
450 |
451 LL | #[suggestion(parse_add_paren, code = "", style = "hidden", style = "normal")]
452 | ^^^^^^^^^^^^^^^^
453 |
454 note: previously specified here
455 --> $DIR/subdiagnostic-derive.rs:746:42
456 |
457 LL | #[suggestion(parse_add_paren, code = "", style = "hidden", style = "normal")]
458 | ^^^^^^^^^^^^^^^^
459
460 error: `#[suggestion_hidden(...)]` is not a valid attribute
461 --> $DIR/subdiagnostic-derive.rs:755:1
462 |
463 LL | #[suggestion_hidden(parse_add_paren, code = "")]
464 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
465 |
466 = help: Use `#[suggestion(..., style = "hidden")]` instead
467
468 error: `#[suggestion_hidden(...)]` is not a valid attribute
469 --> $DIR/subdiagnostic-derive.rs:763:1
470 |
471 LL | #[suggestion_hidden(parse_add_paren, code = "", style = "normal")]
472 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
473 |
474 = help: Use `#[suggestion(..., style = "hidden")]` instead
475
476 error: invalid suggestion style
477 --> $DIR/subdiagnostic-derive.rs:771:50
478 |
479 LL | #[suggestion(parse_add_paren, code = "", style = "foo")]
480 | ^^^^^
481 |
482 = help: valid styles are `normal`, `short`, `hidden`, `verbose` and `tool-only`
483
484 error: `#[suggestion(style = ...)]` is not a valid attribute
485 --> $DIR/subdiagnostic-derive.rs:779:42
486 |
487 LL | #[suggestion(parse_add_paren, code = "", style = 42)]
488 | ^^^^^^^^^^
489
490 error: `#[suggestion(style)]` is not a valid attribute
491 --> $DIR/subdiagnostic-derive.rs:787:42
492 |
493 LL | #[suggestion(parse_add_paren, code = "", style)]
494 | ^^^^^
495 |
496 = help: a diagnostic slug must be the first argument to the attribute
497
498 error: `#[suggestion(style(...))]` is not a valid attribute
499 --> $DIR/subdiagnostic-derive.rs:795:42
500 |
501 LL | #[suggestion(parse_add_paren, code = "", style("foo"))]
502 | ^^^^^^^^^^^^
503
504 error: cannot find attribute `foo` in this scope
505 --> $DIR/subdiagnostic-derive.rs:63:3
506 |
507 LL | #[foo]
508 | ^^^
509
510 error: cannot find attribute `foo` in this scope
511 --> $DIR/subdiagnostic-derive.rs:159:3
512 |
513 LL | #[foo]
514 | ^^^
515
516 error: cannot find attribute `bar` in this scope
517 --> $DIR/subdiagnostic-derive.rs:173:7
518 |
519 LL | #[bar]
520 | ^^^
521
522 error: cannot find attribute `bar` in this scope
523 --> $DIR/subdiagnostic-derive.rs:185:7
524 |
525 LL | #[bar = "..."]
526 | ^^^
527
528 error: cannot find attribute `bar` in this scope
529 --> $DIR/subdiagnostic-derive.rs:197:7
530 |
531 LL | #[bar = 4]
532 | ^^^
533
534 error: cannot find attribute `bar` in this scope
535 --> $DIR/subdiagnostic-derive.rs:209:7
536 |
537 LL | #[bar("...")]
538 | ^^^
539
540 error: cannot find attribute `bar` in this scope
541 --> $DIR/subdiagnostic-derive.rs:270:7
542 |
543 LL | #[bar]
544 | ^^^
545
546 error: cannot find attribute `bar` in this scope
547 --> $DIR/subdiagnostic-derive.rs:281:7
548 |
549 LL | #[bar = "..."]
550 | ^^^
551
552 error: cannot find attribute `bar` in this scope
553 --> $DIR/subdiagnostic-derive.rs:292:7
554 |
555 LL | #[bar("...")]
556 | ^^^
557
558 error[E0425]: cannot find value `slug` in module `rustc_errors::fluent`
559 --> $DIR/subdiagnostic-derive.rs:122:9
560 |
561 LL | #[label(slug)]
562 | ^^^^ not found in `rustc_errors::fluent`
563
564 error: aborting due to 79 previous errors
565
566 For more information about this error, try `rustc --explain E0425`.