1 error: label without `#[primary_span]` field
2 --> $DIR/subdiagnostic-derive.rs:49:1
4 LL | / #[label(no_crate_example)]
11 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
12 --> $DIR/subdiagnostic-derive.rs:56:1
17 error: `#[foo]` is not a valid attribute
18 --> $DIR/subdiagnostic-derive.rs:65:1
23 error: `#[label = ...]` is not a valid attribute
24 --> $DIR/subdiagnostic-derive.rs:75:1
29 error: invalid nested attribute
30 --> $DIR/subdiagnostic-derive.rs:84:9
32 LL | #[label(bug = "...")]
35 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
36 --> $DIR/subdiagnostic-derive.rs:84:1
38 LL | #[label(bug = "...")]
39 | ^^^^^^^^^^^^^^^^^^^^^
41 error: unexpected literal in nested attribute, expected ident
42 --> $DIR/subdiagnostic-derive.rs:94:9
47 error: invalid nested attribute
48 --> $DIR/subdiagnostic-derive.rs:103:9
50 LL | #[label(slug = 4)]
53 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
54 --> $DIR/subdiagnostic-derive.rs:103:1
56 LL | #[label(slug = 4)]
59 error: invalid nested attribute
60 --> $DIR/subdiagnostic-derive.rs:113:9
62 LL | #[label(slug("..."))]
65 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
66 --> $DIR/subdiagnostic-derive.rs:113:1
68 LL | #[label(slug("..."))]
69 | ^^^^^^^^^^^^^^^^^^^^^
71 error: unexpected end of input, unexpected token in nested attribute, expected ident
72 --> $DIR/subdiagnostic-derive.rs:133:9
77 error: invalid nested attribute
78 --> $DIR/subdiagnostic-derive.rs:142:27
80 LL | #[label(no_crate_example, code = "...")]
83 error: invalid nested attribute
84 --> $DIR/subdiagnostic-derive.rs:151:27
86 LL | #[label(no_crate_example, applicability = "machine-applicable")]
89 error: unsupported type attribute for subdiagnostic enum
90 --> $DIR/subdiagnostic-derive.rs:160:1
95 error: `#[bar]` is not a valid attribute
96 --> $DIR/subdiagnostic-derive.rs:174:5
101 error: `#[bar = ...]` is not a valid attribute
102 --> $DIR/subdiagnostic-derive.rs:186:5
107 error: `#[bar = ...]` is not a valid attribute
108 --> $DIR/subdiagnostic-derive.rs:198:5
113 error: `#[bar(...)]` is not a valid attribute
114 --> $DIR/subdiagnostic-derive.rs:210:5
119 error: invalid nested attribute
120 --> $DIR/subdiagnostic-derive.rs:222:13
122 LL | #[label(code = "...")]
125 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
126 --> $DIR/subdiagnostic-derive.rs:222:5
128 LL | #[label(code = "...")]
129 | ^^^^^^^^^^^^^^^^^^^^^^
131 error: the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
132 --> $DIR/subdiagnostic-derive.rs:251:5
137 error: label without `#[primary_span]` field
138 --> $DIR/subdiagnostic-derive.rs:248:1
140 LL | / #[label(no_crate_example)]
143 LL | | #[primary_span]
149 error: `#[applicability]` is only valid on suggestions
150 --> $DIR/subdiagnostic-derive.rs:261:5
152 LL | #[applicability]
155 error: `#[bar]` is not a valid attribute
156 --> $DIR/subdiagnostic-derive.rs:271:5
161 = help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
163 error: `#[bar = ...]` is not a valid attribute
164 --> $DIR/subdiagnostic-derive.rs:282:5
169 error: `#[bar(...)]` is not a valid attribute
170 --> $DIR/subdiagnostic-derive.rs:293:5
175 = help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
177 error: unexpected unsupported untagged union
178 --> $DIR/subdiagnostic-derive.rs:309:1
187 error: a diagnostic slug must be the first argument to the attribute
188 --> $DIR/subdiagnostic-derive.rs:324:44
190 LL | #[label(no_crate_example, no_crate::example)]
193 error: specified multiple times
194 --> $DIR/subdiagnostic-derive.rs:337:5
199 note: previously specified here
200 --> $DIR/subdiagnostic-derive.rs:334:5
205 error: subdiagnostic kind not specified
206 --> $DIR/subdiagnostic-derive.rs:343:8
211 error: specified multiple times
212 --> $DIR/subdiagnostic-derive.rs:380:46
214 LL | #[suggestion(no_crate_example, code = "...", code = "...")]
217 note: previously specified here
218 --> $DIR/subdiagnostic-derive.rs:380:32
220 LL | #[suggestion(no_crate_example, code = "...", code = "...")]
223 error: specified multiple times
224 --> $DIR/subdiagnostic-derive.rs:398:5
226 LL | #[applicability]
229 note: previously specified here
230 --> $DIR/subdiagnostic-derive.rs:395:5
232 LL | #[applicability]
235 error: the `#[applicability]` attribute can only be applied to fields of type `Applicability`
236 --> $DIR/subdiagnostic-derive.rs:408:5
238 LL | #[applicability]
241 error: suggestion without `code = "..."`
242 --> $DIR/subdiagnostic-derive.rs:421:1
244 LL | #[suggestion(no_crate_example)]
245 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
247 error: invalid applicability
248 --> $DIR/subdiagnostic-derive.rs:431:62
250 LL | #[suggestion(no_crate_example, code = "...", applicability = "foo")]
253 error: suggestion without `#[primary_span]` field
254 --> $DIR/subdiagnostic-derive.rs:449:1
256 LL | / #[suggestion(no_crate_example, code = "...")]
263 error: unsupported type attribute for subdiagnostic enum
264 --> $DIR/subdiagnostic-derive.rs:463:1
269 error: `var` doesn't refer to a field on this type
270 --> $DIR/subdiagnostic-derive.rs:483:39
272 LL | #[suggestion(no_crate_example, code = "{var}", applicability = "machine-applicable")]
275 error: `var` doesn't refer to a field on this type
276 --> $DIR/subdiagnostic-derive.rs:502:43
278 LL | #[suggestion(no_crate_example, code = "{var}", applicability = "machine-applicable")]
281 error: `#[suggestion_part]` is not a valid attribute
282 --> $DIR/subdiagnostic-derive.rs:525:5
284 LL | #[suggestion_part]
287 = help: `#[suggestion_part(...)]` is only valid in multipart suggestions, use `#[primary_span]` instead
289 error: `#[suggestion_part(...)]` is not a valid attribute
290 --> $DIR/subdiagnostic-derive.rs:528:5
292 LL | #[suggestion_part(code = "...")]
293 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
295 = help: `#[suggestion_part(...)]` is only valid in multipart suggestions
297 error: suggestion without `#[primary_span]` field
298 --> $DIR/subdiagnostic-derive.rs:522:1
300 LL | / #[suggestion(no_crate_example, code = "...")]
303 LL | | #[suggestion_part]
309 error: invalid nested attribute
310 --> $DIR/subdiagnostic-derive.rs:537:42
312 LL | #[multipart_suggestion(no_crate_example, code = "...", applicability = "machine-applicable")]
315 = help: only `style` and `applicability` are valid nested attributes
317 error: multipart suggestion without any `#[suggestion_part(...)]` fields
318 --> $DIR/subdiagnostic-derive.rs:537:1
320 LL | / #[multipart_suggestion(no_crate_example, code = "...", applicability = "machine-applicable")]
328 error: `#[suggestion_part(...)]` attribute without `code = "..."`
329 --> $DIR/subdiagnostic-derive.rs:547:5
331 LL | #[suggestion_part]
334 error: unexpected end of input, unexpected token in nested attribute, expected ident
335 --> $DIR/subdiagnostic-derive.rs:555:23
337 LL | #[suggestion_part()]
340 error: `#[primary_span]` is not a valid attribute
341 --> $DIR/subdiagnostic-derive.rs:564:5
346 = help: multipart suggestions use one or more `#[suggestion_part]`s rather than one `#[primary_span]`
348 error: multipart suggestion without any `#[suggestion_part(...)]` fields
349 --> $DIR/subdiagnostic-derive.rs:561:1
351 LL | / #[multipart_suggestion(no_crate_example)]
354 LL | | #[primary_span]
360 error: `#[suggestion_part(...)]` attribute without `code = "..."`
361 --> $DIR/subdiagnostic-derive.rs:572:5
363 LL | #[suggestion_part]
366 error: `code` is the only valid nested attribute
367 --> $DIR/subdiagnostic-derive.rs:578:23
369 LL | #[suggestion_part(foo = "bar")]
372 error: the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
373 --> $DIR/subdiagnostic-derive.rs:582:5
375 LL | #[suggestion_part(code = "...")]
376 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
378 error: the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
379 --> $DIR/subdiagnostic-derive.rs:585:5
381 LL | #[suggestion_part()]
382 | ^^^^^^^^^^^^^^^^^^^^
384 error: unexpected end of input, unexpected token in nested attribute, expected ident
385 --> $DIR/subdiagnostic-derive.rs:575:23
387 LL | #[suggestion_part()]
391 --> $DIR/subdiagnostic-derive.rs:578:27
393 LL | #[suggestion_part(foo = "bar")]
396 error: specified multiple times
397 --> $DIR/subdiagnostic-derive.rs:593:37
399 LL | #[suggestion_part(code = "...", code = ",,,")]
402 note: previously specified here
403 --> $DIR/subdiagnostic-derive.rs:593:23
405 LL | #[suggestion_part(code = "...", code = ",,,")]
408 error: `#[applicability]` has no effect if all `#[suggestion]`/`#[multipart_suggestion]` attributes have a static `applicability = "..."`
409 --> $DIR/subdiagnostic-derive.rs:622:5
411 LL | #[applicability]
414 error: expected exactly one string literal for `code = ...`
415 --> $DIR/subdiagnostic-derive.rs:670:34
417 LL | #[suggestion_part(code("foo"))]
420 error: unexpected token
421 --> $DIR/subdiagnostic-derive.rs:670:28
423 LL | #[suggestion_part(code("foo"))]
426 error: expected exactly one string literal for `code = ...`
427 --> $DIR/subdiagnostic-derive.rs:680:41
429 LL | #[suggestion_part(code("foo", "bar"))]
432 error: unexpected token
433 --> $DIR/subdiagnostic-derive.rs:680:28
435 LL | #[suggestion_part(code("foo", "bar"))]
438 error: expected exactly one string literal for `code = ...`
439 --> $DIR/subdiagnostic-derive.rs:690:30
441 LL | #[suggestion_part(code(3))]
444 error: unexpected token
445 --> $DIR/subdiagnostic-derive.rs:690:28
447 LL | #[suggestion_part(code(3))]
450 error: expected exactly one string literal for `code = ...`
451 --> $DIR/subdiagnostic-derive.rs:700:29
453 LL | #[suggestion_part(code())]
456 error: expected string literal
457 --> $DIR/subdiagnostic-derive.rs:712:30
459 LL | #[suggestion_part(code = 3)]
462 error: specified multiple times
463 --> $DIR/subdiagnostic-derive.rs:754:1
465 LL | #[suggestion(no_crate_example, code = "", style = "hidden", style = "normal")]
466 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
468 note: previously specified here
469 --> $DIR/subdiagnostic-derive.rs:754:1
471 LL | #[suggestion(no_crate_example, code = "", style = "hidden", style = "normal")]
472 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
474 error: `#[suggestion_hidden(...)]` is not a valid attribute
475 --> $DIR/subdiagnostic-derive.rs:763:1
477 LL | #[suggestion_hidden(no_crate_example, code = "")]
478 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
480 = help: Use `#[suggestion(..., style = "hidden")]` instead
482 error: `#[suggestion_hidden(...)]` is not a valid attribute
483 --> $DIR/subdiagnostic-derive.rs:771:1
485 LL | #[suggestion_hidden(no_crate_example, code = "", style = "normal")]
486 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
488 = help: Use `#[suggestion(..., style = "hidden")]` instead
490 error: invalid suggestion style
491 --> $DIR/subdiagnostic-derive.rs:779:51
493 LL | #[suggestion(no_crate_example, code = "", style = "foo")]
496 = help: valid styles are `normal`, `short`, `hidden`, `verbose` and `tool-only`
498 error: expected `= "xxx"`
499 --> $DIR/subdiagnostic-derive.rs:787:49
501 LL | #[suggestion(no_crate_example, code = "", style = 42)]
504 error: a diagnostic slug must be the first argument to the attribute
505 --> $DIR/subdiagnostic-derive.rs:795:48
507 LL | #[suggestion(no_crate_example, code = "", style)]
510 error: expected `= "xxx"`
511 --> $DIR/subdiagnostic-derive.rs:803:48
513 LL | #[suggestion(no_crate_example, code = "", style("foo"))]
517 --> $DIR/subdiagnostic-derive.rs:803:48
519 LL | #[suggestion(no_crate_example, code = "", style("foo"))]
522 error: `#[primary_span]` is not a valid attribute
523 --> $DIR/subdiagnostic-derive.rs:815:5
528 = note: there must be exactly one primary span
529 = help: to create a suggestion with multiple spans, use `#[multipart_suggestion]` instead
531 error: suggestion without `#[primary_span]` field
532 --> $DIR/subdiagnostic-derive.rs:812:1
534 LL | / #[suggestion(no_crate_example, code = "")]
536 LL | | struct PrimarySpanOnVec {
537 LL | | #[primary_span]
539 LL | | sub: Vec<Span>,
543 error: cannot find attribute `foo` in this scope
544 --> $DIR/subdiagnostic-derive.rs:65:3
549 error: cannot find attribute `foo` in this scope
550 --> $DIR/subdiagnostic-derive.rs:160:3
555 error: cannot find attribute `bar` in this scope
556 --> $DIR/subdiagnostic-derive.rs:174:7
561 error: cannot find attribute `bar` in this scope
562 --> $DIR/subdiagnostic-derive.rs:186:7
567 error: cannot find attribute `bar` in this scope
568 --> $DIR/subdiagnostic-derive.rs:198:7
573 error: cannot find attribute `bar` in this scope
574 --> $DIR/subdiagnostic-derive.rs:210:7
579 error: cannot find attribute `bar` in this scope
580 --> $DIR/subdiagnostic-derive.rs:271:7
585 error: cannot find attribute `bar` in this scope
586 --> $DIR/subdiagnostic-derive.rs:282:7
591 error: cannot find attribute `bar` in this scope
592 --> $DIR/subdiagnostic-derive.rs:293:7
597 error[E0425]: cannot find value `slug` in module `crate::fluent_generated`
598 --> $DIR/subdiagnostic-derive.rs:123:9
601 | ^^^^ not found in `crate::fluent_generated`
603 error[E0425]: cannot find value `__code_29` in this scope
604 --> $DIR/subdiagnostic-derive.rs:706:10
606 LL | #[derive(Subdiagnostic)]
607 | ^^^^^^^^^^^^^ not found in this scope
609 = note: this error originates in the derive macro `Subdiagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
611 error: aborting due to 86 previous errors
613 For more information about this error, try `rustc --explain E0425`.