1 error: label without `#[primary_span]` field
2 --> $DIR/subdiagnostic-derive.rs:47:1
4 LL | / #[label(parse_add_paren)]
11 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
12 --> $DIR/subdiagnostic-derive.rs:54:1
17 error: `#[foo]` is not a valid attribute
18 --> $DIR/subdiagnostic-derive.rs:63:1
23 error: `#[label = ...]` is not a valid attribute
24 --> $DIR/subdiagnostic-derive.rs:73:1
29 error: `#[label(bug = ...)]` is not a valid attribute
30 --> $DIR/subdiagnostic-derive.rs:82:9
32 LL | #[label(bug = "...")]
35 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
36 --> $DIR/subdiagnostic-derive.rs:82:1
38 LL | #[label(bug = "...")]
39 | ^^^^^^^^^^^^^^^^^^^^^
41 error: `#[label("...")]` is not a valid attribute
42 --> $DIR/subdiagnostic-derive.rs:92:9
47 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
48 --> $DIR/subdiagnostic-derive.rs:92:1
53 error: `#[label(slug = ...)]` is not a valid attribute
54 --> $DIR/subdiagnostic-derive.rs:102:9
56 LL | #[label(slug = 4)]
59 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
60 --> $DIR/subdiagnostic-derive.rs:102:1
62 LL | #[label(slug = 4)]
65 error: `#[label(slug(...))]` is not a valid attribute
66 --> $DIR/subdiagnostic-derive.rs:112:9
68 LL | #[label(slug("..."))]
71 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
72 --> $DIR/subdiagnostic-derive.rs:112:1
74 LL | #[label(slug("..."))]
75 | ^^^^^^^^^^^^^^^^^^^^^
77 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
78 --> $DIR/subdiagnostic-derive.rs:132:1
83 error: `#[label(code = ...)]` is not a valid attribute
84 --> $DIR/subdiagnostic-derive.rs:141:26
86 LL | #[label(parse_add_paren, code = "...")]
89 error: `#[label(applicability = ...)]` is not a valid attribute
90 --> $DIR/subdiagnostic-derive.rs:150:26
92 LL | #[label(parse_add_paren, applicability = "machine-applicable")]
93 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
95 error: unsupported type attribute for subdiagnostic enum
96 --> $DIR/subdiagnostic-derive.rs:159:1
101 error: `#[bar]` is not a valid attribute
102 --> $DIR/subdiagnostic-derive.rs:173:5
107 error: `#[bar = ...]` is not a valid attribute
108 --> $DIR/subdiagnostic-derive.rs:185:5
113 error: `#[bar = ...]` is not a valid attribute
114 --> $DIR/subdiagnostic-derive.rs:197:5
119 error: `#[bar(...)]` is not a valid attribute
120 --> $DIR/subdiagnostic-derive.rs:209:5
125 error: `#[label(code = ...)]` is not a valid attribute
126 --> $DIR/subdiagnostic-derive.rs:221:13
128 LL | #[label(code = "...")]
131 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
132 --> $DIR/subdiagnostic-derive.rs:221:5
134 LL | #[label(code = "...")]
135 | ^^^^^^^^^^^^^^^^^^^^^^
137 error: the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
138 --> $DIR/subdiagnostic-derive.rs:250:5
143 error: label without `#[primary_span]` field
144 --> $DIR/subdiagnostic-derive.rs:247:1
146 LL | / #[label(parse_add_paren)]
149 LL | | #[primary_span]
155 error: `#[applicability]` is only valid on suggestions
156 --> $DIR/subdiagnostic-derive.rs:260:5
158 LL | #[applicability]
161 error: `#[bar]` is not a valid attribute
162 --> $DIR/subdiagnostic-derive.rs:270:5
167 = help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
169 error: `#[bar = ...]` is not a valid attribute
170 --> $DIR/subdiagnostic-derive.rs:281:5
175 error: `#[bar(...)]` is not a valid attribute
176 --> $DIR/subdiagnostic-derive.rs:292:5
181 = help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
183 error: unexpected unsupported untagged union
184 --> $DIR/subdiagnostic-derive.rs:308:1
193 error: `#[label(parse_add_paren)]` is not a valid attribute
194 --> $DIR/subdiagnostic-derive.rs:323:26
196 LL | #[label(parse_add_paren, parse_add_paren)]
199 = help: a diagnostic slug must be the first argument to the attribute
201 error: specified multiple times
202 --> $DIR/subdiagnostic-derive.rs:336:5
207 note: previously specified here
208 --> $DIR/subdiagnostic-derive.rs:333:5
213 error: subdiagnostic kind not specified
214 --> $DIR/subdiagnostic-derive.rs:342:8
219 error: specified multiple times
220 --> $DIR/subdiagnostic-derive.rs:379:45
222 LL | #[suggestion(parse_add_paren, code = "...", code = "...")]
225 note: previously specified here
226 --> $DIR/subdiagnostic-derive.rs:379:31
228 LL | #[suggestion(parse_add_paren, code = "...", code = "...")]
231 error: specified multiple times
232 --> $DIR/subdiagnostic-derive.rs:397:5
234 LL | #[applicability]
237 note: previously specified here
238 --> $DIR/subdiagnostic-derive.rs:394:5
240 LL | #[applicability]
243 error: the `#[applicability]` attribute can only be applied to fields of type `Applicability`
244 --> $DIR/subdiagnostic-derive.rs:407:5
246 LL | #[applicability]
249 error: suggestion without `code = "..."`
250 --> $DIR/subdiagnostic-derive.rs:420:1
252 LL | #[suggestion(parse_add_paren)]
253 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
255 error: invalid applicability
256 --> $DIR/subdiagnostic-derive.rs:430:45
258 LL | #[suggestion(parse_add_paren, code = "...", applicability = "foo")]
259 | ^^^^^^^^^^^^^^^^^^^^^
261 error: suggestion without `#[primary_span]` field
262 --> $DIR/subdiagnostic-derive.rs:448:1
264 LL | / #[suggestion(parse_add_paren, code = "...")]
271 error: unsupported type attribute for subdiagnostic enum
272 --> $DIR/subdiagnostic-derive.rs:462:1
277 error: `var` doesn't refer to a field on this type
278 --> $DIR/subdiagnostic-derive.rs:482:38
280 LL | #[suggestion(parse_add_paren, code = "{var}", applicability = "machine-applicable")]
283 error: `var` doesn't refer to a field on this type
284 --> $DIR/subdiagnostic-derive.rs:501:42
286 LL | #[suggestion(parse_add_paren, code = "{var}", applicability = "machine-applicable")]
289 error: `#[suggestion_part]` is not a valid attribute
290 --> $DIR/subdiagnostic-derive.rs:524:5
292 LL | #[suggestion_part]
295 = help: `#[suggestion_part(...)]` is only valid in multipart suggestions, use `#[primary_span]` instead
297 error: `#[suggestion_part(...)]` is not a valid attribute
298 --> $DIR/subdiagnostic-derive.rs:527:5
300 LL | #[suggestion_part(code = "...")]
301 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
303 = help: `#[suggestion_part(...)]` is only valid in multipart suggestions
305 error: suggestion without `#[primary_span]` field
306 --> $DIR/subdiagnostic-derive.rs:521:1
308 LL | / #[suggestion(parse_add_paren, code = "...")]
311 LL | | #[suggestion_part]
317 error: `#[multipart_suggestion(code = ...)]` is not a valid attribute
318 --> $DIR/subdiagnostic-derive.rs:536:41
320 LL | #[multipart_suggestion(parse_add_paren, code = "...", applicability = "machine-applicable")]
323 = help: only `style` and `applicability` are valid nested attributes
325 error: multipart suggestion without any `#[suggestion_part(...)]` fields
326 --> $DIR/subdiagnostic-derive.rs:536:1
328 LL | / #[multipart_suggestion(parse_add_paren, code = "...", applicability = "machine-applicable")]
336 error: `#[suggestion_part(...)]` attribute without `code = "..."`
337 --> $DIR/subdiagnostic-derive.rs:546:5
339 LL | #[suggestion_part]
342 error: `#[suggestion_part(...)]` attribute without `code = "..."`
343 --> $DIR/subdiagnostic-derive.rs:554:5
345 LL | #[suggestion_part()]
346 | ^^^^^^^^^^^^^^^^^^^^
348 error: `#[primary_span]` is not a valid attribute
349 --> $DIR/subdiagnostic-derive.rs:563:5
354 = help: multipart suggestions use one or more `#[suggestion_part]`s rather than one `#[primary_span]`
356 error: multipart suggestion without any `#[suggestion_part(...)]` fields
357 --> $DIR/subdiagnostic-derive.rs:560:1
359 LL | / #[multipart_suggestion(parse_add_paren)]
362 LL | | #[primary_span]
368 error: `#[suggestion_part(...)]` attribute without `code = "..."`
369 --> $DIR/subdiagnostic-derive.rs:571:5
371 LL | #[suggestion_part]
374 error: `#[suggestion_part(...)]` attribute without `code = "..."`
375 --> $DIR/subdiagnostic-derive.rs:574:5
377 LL | #[suggestion_part()]
378 | ^^^^^^^^^^^^^^^^^^^^
380 error: `#[suggestion_part(foo = ...)]` is not a valid attribute
381 --> $DIR/subdiagnostic-derive.rs:577:23
383 LL | #[suggestion_part(foo = "bar")]
386 = help: `code` is the only valid nested attribute
388 error: the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
389 --> $DIR/subdiagnostic-derive.rs:580:5
391 LL | #[suggestion_part(code = "...")]
392 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
394 error: the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
395 --> $DIR/subdiagnostic-derive.rs:583:5
397 LL | #[suggestion_part()]
398 | ^^^^^^^^^^^^^^^^^^^^
400 error: specified multiple times
401 --> $DIR/subdiagnostic-derive.rs:591:37
403 LL | #[suggestion_part(code = "...", code = ",,,")]
406 note: previously specified here
407 --> $DIR/subdiagnostic-derive.rs:591:23
409 LL | #[suggestion_part(code = "...", code = ",,,")]
412 error: `#[applicability]` has no effect if all `#[suggestion]`/`#[multipart_suggestion]` attributes have a static `applicability = "..."`
413 --> $DIR/subdiagnostic-derive.rs:620:5
415 LL | #[applicability]
418 error: expected exactly one string literal for `code = ...`
419 --> $DIR/subdiagnostic-derive.rs:668:23
421 LL | #[suggestion_part(code("foo"))]
424 error: expected exactly one string literal for `code = ...`
425 --> $DIR/subdiagnostic-derive.rs:677:23
427 LL | #[suggestion_part(code("foo", "bar"))]
430 error: expected exactly one string literal for `code = ...`
431 --> $DIR/subdiagnostic-derive.rs:686:23
433 LL | #[suggestion_part(code(3))]
436 error: expected exactly one string literal for `code = ...`
437 --> $DIR/subdiagnostic-derive.rs:695:23
439 LL | #[suggestion_part(code())]
442 error: `code = "..."`/`code(...)` must contain only string literals
443 --> $DIR/subdiagnostic-derive.rs:704:23
445 LL | #[suggestion_part(code = 3)]
448 error: specified multiple times
449 --> $DIR/subdiagnostic-derive.rs:746:60
451 LL | #[suggestion(parse_add_paren, code = "", style = "hidden", style = "normal")]
454 note: previously specified here
455 --> $DIR/subdiagnostic-derive.rs:746:42
457 LL | #[suggestion(parse_add_paren, code = "", style = "hidden", style = "normal")]
460 error: `#[suggestion_hidden(...)]` is not a valid attribute
461 --> $DIR/subdiagnostic-derive.rs:755:1
463 LL | #[suggestion_hidden(parse_add_paren, code = "")]
464 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
466 = help: Use `#[suggestion(..., style = "hidden")]` instead
468 error: `#[suggestion_hidden(...)]` is not a valid attribute
469 --> $DIR/subdiagnostic-derive.rs:763:1
471 LL | #[suggestion_hidden(parse_add_paren, code = "", style = "normal")]
472 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
474 = help: Use `#[suggestion(..., style = "hidden")]` instead
476 error: invalid suggestion style
477 --> $DIR/subdiagnostic-derive.rs:771:50
479 LL | #[suggestion(parse_add_paren, code = "", style = "foo")]
482 = help: valid styles are `normal`, `short`, `hidden`, `verbose` and `tool-only`
484 error: `#[suggestion(style = ...)]` is not a valid attribute
485 --> $DIR/subdiagnostic-derive.rs:779:42
487 LL | #[suggestion(parse_add_paren, code = "", style = 42)]
490 error: `#[suggestion(style)]` is not a valid attribute
491 --> $DIR/subdiagnostic-derive.rs:787:42
493 LL | #[suggestion(parse_add_paren, code = "", style)]
496 = help: a diagnostic slug must be the first argument to the attribute
498 error: `#[suggestion(style(...))]` is not a valid attribute
499 --> $DIR/subdiagnostic-derive.rs:795:42
501 LL | #[suggestion(parse_add_paren, code = "", style("foo"))]
504 error: `#[primary_span]` is not a valid attribute
505 --> $DIR/subdiagnostic-derive.rs:806:5
510 = note: there must be exactly one primary span
511 = help: to create a suggestion with multiple spans, use `#[multipart_suggestion]` instead
513 error: suggestion without `#[primary_span]` field
514 --> $DIR/subdiagnostic-derive.rs:803:1
516 LL | / #[suggestion(parse_add_paren, code = "")]
518 LL | | struct PrimarySpanOnVec {
519 LL | | #[primary_span]
521 LL | | sub: Vec<Span>,
525 error: cannot find attribute `foo` in this scope
526 --> $DIR/subdiagnostic-derive.rs:63:3
531 error: cannot find attribute `foo` in this scope
532 --> $DIR/subdiagnostic-derive.rs:159:3
537 error: cannot find attribute `bar` in this scope
538 --> $DIR/subdiagnostic-derive.rs:173:7
543 error: cannot find attribute `bar` in this scope
544 --> $DIR/subdiagnostic-derive.rs:185:7
549 error: cannot find attribute `bar` in this scope
550 --> $DIR/subdiagnostic-derive.rs:197:7
555 error: cannot find attribute `bar` in this scope
556 --> $DIR/subdiagnostic-derive.rs:209:7
561 error: cannot find attribute `bar` in this scope
562 --> $DIR/subdiagnostic-derive.rs:270:7
567 error: cannot find attribute `bar` in this scope
568 --> $DIR/subdiagnostic-derive.rs:281:7
573 error: cannot find attribute `bar` in this scope
574 --> $DIR/subdiagnostic-derive.rs:292:7
579 error[E0425]: cannot find value `slug` in module `rustc_errors::fluent`
580 --> $DIR/subdiagnostic-derive.rs:122:9
583 | ^^^^ not found in `rustc_errors::fluent`
585 error: aborting due to 81 previous errors
587 For more information about this error, try `rustc --explain E0425`.