1 error: label without `#[primary_span]` field
2 --> $DIR/subdiagnostic-derive.rs:47:1
4 LL | / #[label(parser::add_paren)]
11 error: `#[label]` is not a valid 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 = help: first argument of the attribute should be the diagnostic slug
37 error: `#[label("...")]` is not a valid attribute
38 --> $DIR/subdiagnostic-derive.rs:91:9
43 = help: first argument of the attribute should be the diagnostic slug
45 error: `#[label(slug = ...)]` is not a valid attribute
46 --> $DIR/subdiagnostic-derive.rs:100:9
48 LL | #[label(slug = 4)]
51 = help: first argument of the attribute should be the diagnostic slug
53 error: `#[label(slug(...))]` is not a valid attribute
54 --> $DIR/subdiagnostic-derive.rs:109:9
56 LL | #[label(slug("..."))]
59 = help: first argument of the attribute should be the diagnostic slug
61 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
62 --> $DIR/subdiagnostic-derive.rs:128:1
67 error: `code` is not a valid nested attribute of a `label` attribute
68 --> $DIR/subdiagnostic-derive.rs:137:28
70 LL | #[label(parser::add_paren, code = "...")]
73 error: `applicability` is not a valid nested attribute of a `label` attribute
74 --> $DIR/subdiagnostic-derive.rs:146:28
76 LL | #[label(parser::add_paren, applicability = "machine-applicable")]
77 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
79 error: unsupported type attribute for subdiagnostic enum
80 --> $DIR/subdiagnostic-derive.rs:155:1
85 error: `#[bar]` is not a valid attribute
86 --> $DIR/subdiagnostic-derive.rs:169:5
91 error: `#[bar = ...]` is not a valid attribute
92 --> $DIR/subdiagnostic-derive.rs:181:5
97 error: `#[bar = ...]` is not a valid attribute
98 --> $DIR/subdiagnostic-derive.rs:193:5
103 error: `#[bar(...)]` is not a valid attribute
104 --> $DIR/subdiagnostic-derive.rs:205:5
109 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
110 --> $DIR/subdiagnostic-derive.rs:217:5
112 LL | #[label(code = "...")]
113 | ^^^^^^^^^^^^^^^^^^^^^^
115 error: subdiagnostic kind not specified
116 --> $DIR/subdiagnostic-derive.rs:234:5
121 error: the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
122 --> $DIR/subdiagnostic-derive.rs:246:5
127 error: label without `#[primary_span]` field
128 --> $DIR/subdiagnostic-derive.rs:243:1
130 LL | / #[label(parser::add_paren)]
133 LL | | #[primary_span]
139 error: `#[applicability]` is only valid on suggestions
140 --> $DIR/subdiagnostic-derive.rs:256:5
142 LL | #[applicability]
145 error: `#[bar]` is not a valid attribute
146 --> $DIR/subdiagnostic-derive.rs:266:5
151 = help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
153 error: `#[bar = ...]` is not a valid attribute
154 --> $DIR/subdiagnostic-derive.rs:277:5
159 error: `#[bar(...)]` is not a valid attribute
160 --> $DIR/subdiagnostic-derive.rs:288:5
165 = help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
167 error: unexpected unsupported untagged union
168 --> $DIR/subdiagnostic-derive.rs:304:1
177 error: `#[label(parser::add_paren)]` is not a valid attribute
178 --> $DIR/subdiagnostic-derive.rs:319:28
180 LL | #[label(parser::add_paren, parser::add_paren)]
183 = help: a diagnostic slug must be the first argument to the attribute
185 error: specified multiple times
186 --> $DIR/subdiagnostic-derive.rs:332:5
191 note: previously specified here
192 --> $DIR/subdiagnostic-derive.rs:329:5
197 error: subdiagnostic kind not specified
198 --> $DIR/subdiagnostic-derive.rs:338:8
203 error: specified multiple times
204 --> $DIR/subdiagnostic-derive.rs:375:47
206 LL | #[suggestion(parser::add_paren, code = "...", code = "...")]
209 note: previously specified here
210 --> $DIR/subdiagnostic-derive.rs:375:33
212 LL | #[suggestion(parser::add_paren, code = "...", code = "...")]
215 error: specified multiple times
216 --> $DIR/subdiagnostic-derive.rs:393:5
218 LL | #[applicability]
221 note: previously specified here
222 --> $DIR/subdiagnostic-derive.rs:390:5
224 LL | #[applicability]
227 error: the `#[applicability]` attribute can only be applied to fields of type `Applicability`
228 --> $DIR/subdiagnostic-derive.rs:403:5
230 LL | #[applicability]
233 error: suggestion without `code = "..."`
234 --> $DIR/subdiagnostic-derive.rs:416:1
236 LL | #[suggestion(parser::add_paren)]
237 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
239 error: invalid applicability
240 --> $DIR/subdiagnostic-derive.rs:426:46
242 LL | #[suggestion(parser::add_paren, code ="...", applicability = "foo")]
243 | ^^^^^^^^^^^^^^^^^^^^^
245 error: suggestion without `#[primary_span]` field
246 --> $DIR/subdiagnostic-derive.rs:444:1
248 LL | / #[suggestion(parser::add_paren, code = "...")]
255 error: unsupported type attribute for subdiagnostic enum
256 --> $DIR/subdiagnostic-derive.rs:458:1
261 error: `var` doesn't refer to a field on this type
262 --> $DIR/subdiagnostic-derive.rs:478:39
264 LL | #[suggestion(parser::add_paren, code ="{var}", applicability = "machine-applicable")]
267 error: `var` doesn't refer to a field on this type
268 --> $DIR/subdiagnostic-derive.rs:497:43
270 LL | #[suggestion(parser::add_paren, code ="{var}", applicability = "machine-applicable")]
273 error: `#[suggestion_part]` is not a valid attribute
274 --> $DIR/subdiagnostic-derive.rs:520:5
276 LL | #[suggestion_part]
279 = help: `#[suggestion_part(...)]` is only valid in multipart suggestions, use `#[primary_span]` instead
281 error: `#[suggestion_part(...)]` is not a valid attribute
282 --> $DIR/subdiagnostic-derive.rs:523:5
284 LL | #[suggestion_part(code = "...")]
285 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
287 = help: `#[suggestion_part(...)]` is only valid in multipart suggestions
289 error: suggestion without `#[primary_span]` field
290 --> $DIR/subdiagnostic-derive.rs:517:1
292 LL | / #[suggestion(parser::add_paren, code = "...")]
295 LL | | #[suggestion_part]
301 error: `code` is not a valid nested attribute of a `multipart_suggestion` attribute
302 --> $DIR/subdiagnostic-derive.rs:532:43
304 LL | #[multipart_suggestion(parser::add_paren, code = "...", applicability = "machine-applicable")]
307 error: multipart suggestion without any `#[suggestion_part(...)]` fields
308 --> $DIR/subdiagnostic-derive.rs:532:1
310 LL | / #[multipart_suggestion(parser::add_paren, code = "...", applicability = "machine-applicable")]
318 error: `#[suggestion_part(...)]` attribute without `code = "..."`
319 --> $DIR/subdiagnostic-derive.rs:542:5
321 LL | #[suggestion_part]
324 error: `#[suggestion_part(...)]` attribute without `code = "..."`
325 --> $DIR/subdiagnostic-derive.rs:550:5
327 LL | #[suggestion_part()]
328 | ^^^^^^^^^^^^^^^^^^^^
330 error: `#[primary_span]` is not a valid attribute
331 --> $DIR/subdiagnostic-derive.rs:559:5
336 = help: multipart suggestions use one or more `#[suggestion_part]`s rather than one `#[primary_span]`
338 error: multipart suggestion without any `#[suggestion_part(...)]` fields
339 --> $DIR/subdiagnostic-derive.rs:556:1
341 LL | / #[multipart_suggestion(parser::add_paren)]
344 LL | | #[primary_span]
350 error: `#[suggestion_part(...)]` attribute without `code = "..."`
351 --> $DIR/subdiagnostic-derive.rs:567:5
353 LL | #[suggestion_part]
356 error: `#[suggestion_part(...)]` attribute without `code = "..."`
357 --> $DIR/subdiagnostic-derive.rs:570:5
359 LL | #[suggestion_part()]
360 | ^^^^^^^^^^^^^^^^^^^^
362 error: `#[suggestion_part(foo = ...)]` is not a valid attribute
363 --> $DIR/subdiagnostic-derive.rs:573:23
365 LL | #[suggestion_part(foo = "bar")]
368 = help: `code` is the only valid nested attribute
370 error: the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
371 --> $DIR/subdiagnostic-derive.rs:576:5
373 LL | #[suggestion_part(code = "...")]
374 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
376 error: the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
377 --> $DIR/subdiagnostic-derive.rs:579:5
379 LL | #[suggestion_part()]
380 | ^^^^^^^^^^^^^^^^^^^^
382 error: specified multiple times
383 --> $DIR/subdiagnostic-derive.rs:587:37
385 LL | #[suggestion_part(code = "...", code = ",,,")]
388 note: previously specified here
389 --> $DIR/subdiagnostic-derive.rs:587:23
391 LL | #[suggestion_part(code = "...", code = ",,,")]
394 error: specified multiple times
395 --> $DIR/subdiagnostic-derive.rs:617:5
397 LL | #[applicability]
400 note: previously specified here
401 --> $DIR/subdiagnostic-derive.rs:614:43
403 LL | #[multipart_suggestion(parser::add_paren, applicability = "machine-applicable")]
404 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
406 error: cannot find attribute `foo` in this scope
407 --> $DIR/subdiagnostic-derive.rs:63:3
412 error: cannot find attribute `foo` in this scope
413 --> $DIR/subdiagnostic-derive.rs:155:3
418 error: cannot find attribute `bar` in this scope
419 --> $DIR/subdiagnostic-derive.rs:169:7
424 error: cannot find attribute `bar` in this scope
425 --> $DIR/subdiagnostic-derive.rs:181:7
430 error: cannot find attribute `bar` in this scope
431 --> $DIR/subdiagnostic-derive.rs:193:7
436 error: cannot find attribute `bar` in this scope
437 --> $DIR/subdiagnostic-derive.rs:205:7
442 error: cannot find attribute `bar` in this scope
443 --> $DIR/subdiagnostic-derive.rs:266:7
448 error: cannot find attribute `bar` in this scope
449 --> $DIR/subdiagnostic-derive.rs:277:7
454 error: cannot find attribute `bar` in this scope
455 --> $DIR/subdiagnostic-derive.rs:288:7
460 error[E0425]: cannot find value `slug` in module `rustc_errors::fluent`
461 --> $DIR/subdiagnostic-derive.rs:118:9
464 | ^^^^ not found in `rustc_errors::fluent`
466 error: aborting due to 63 previous errors
468 For more information about this error, try `rustc --explain E0425`.