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:1
70 LL | #[label(parser::add_paren, code = "...")]
71 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73 error: `applicability` is not a valid nested attribute of a `label` attribute
74 --> $DIR/subdiagnostic-derive.rs:146:1
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:11
109 = help: first argument of the attribute should be the diagnostic slug
111 error: diagnostic slug must be first argument of a `#[label(...)]` attribute
112 --> $DIR/subdiagnostic-derive.rs:217:5
114 LL | #[label(code = "...")]
115 | ^^^^^^^^^^^^^^^^^^^^^^
117 error: subdiagnostic kind not specified
118 --> $DIR/subdiagnostic-derive.rs:234:5
123 error: the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
124 --> $DIR/subdiagnostic-derive.rs:246:5
129 error: label without `#[primary_span]` field
130 --> $DIR/subdiagnostic-derive.rs:243:1
132 LL | / #[label(parser::add_paren)]
135 LL | | #[primary_span]
141 error: `#[applicability]` is only valid on suggestions
142 --> $DIR/subdiagnostic-derive.rs:256:5
144 LL | #[applicability]
147 error: `#[bar]` is not a valid attribute
148 --> $DIR/subdiagnostic-derive.rs:266:5
153 = help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
155 error: `#[bar = ...]` is not a valid attribute
156 --> $DIR/subdiagnostic-derive.rs:277:5
161 error: `#[bar(...)]` is not a valid attribute
162 --> $DIR/subdiagnostic-derive.rs:288:5
167 error: unexpected unsupported untagged union
168 --> $DIR/subdiagnostic-derive.rs:304:1
177 error: specified multiple times
178 --> $DIR/subdiagnostic-derive.rs:314:1
180 LL | #[label(parser::add_paren)]
181 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
183 note: previously specified here
184 --> $DIR/subdiagnostic-derive.rs:311:1
186 LL | #[label(parser::add_paren)]
187 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
189 error: specified multiple times
190 --> $DIR/subdiagnostic-derive.rs:314:1
192 LL | #[label(parser::add_paren)]
193 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
195 note: previously specified here
196 --> $DIR/subdiagnostic-derive.rs:311:1
198 LL | #[label(parser::add_paren)]
199 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
201 error: `#[label(parser::add_paren)]` is not a valid attribute
202 --> $DIR/subdiagnostic-derive.rs:323:28
204 LL | #[label(parser::add_paren, parser::add_paren)]
207 = help: a diagnostic slug must be the first argument to the attribute
209 error: specified multiple times
210 --> $DIR/subdiagnostic-derive.rs:336:5
215 note: previously specified here
216 --> $DIR/subdiagnostic-derive.rs:333:5
221 error: subdiagnostic kind not specified
222 --> $DIR/subdiagnostic-derive.rs:342:8
227 error: specified multiple times
228 --> $DIR/subdiagnostic-derive.rs:379:47
230 LL | #[suggestion(parser::add_paren, code = "...", code = "...")]
233 note: previously specified here
234 --> $DIR/subdiagnostic-derive.rs:379:33
236 LL | #[suggestion(parser::add_paren, code = "...", code = "...")]
239 error: specified multiple times
240 --> $DIR/subdiagnostic-derive.rs:397:5
242 LL | #[applicability]
245 note: previously specified here
246 --> $DIR/subdiagnostic-derive.rs:394:5
248 LL | #[applicability]
251 error: the `#[applicability]` attribute can only be applied to fields of type `Applicability`
252 --> $DIR/subdiagnostic-derive.rs:408:5
254 LL | #[applicability]
257 error: suggestion without `applicability`
258 --> $DIR/subdiagnostic-derive.rs:403:1
260 LL | / #[suggestion(parser::add_paren, code = "...")]
263 LL | | #[primary_span]
265 LL | | applicability: Span,
269 error: suggestion without `applicability`
270 --> $DIR/subdiagnostic-derive.rs:414:1
272 LL | / #[suggestion(parser::add_paren, code = "...")]
275 LL | | #[primary_span]
280 error: suggestion without `code = "..."`
281 --> $DIR/subdiagnostic-derive.rs:422:1
283 LL | / #[suggestion(parser::add_paren)]
286 LL | | #[primary_span]
288 LL | | applicability: Applicability,
292 error: invalid applicability
293 --> $DIR/subdiagnostic-derive.rs:432:46
295 LL | #[suggestion(parser::add_paren, code ="...", applicability = "foo")]
296 | ^^^^^^^^^^^^^^^^^^^^^
298 error: suggestion without `applicability`
299 --> $DIR/subdiagnostic-derive.rs:450:1
301 LL | / #[suggestion(parser::add_paren, code = "...")]
309 error: suggestion without `#[primary_span]` field
310 --> $DIR/subdiagnostic-derive.rs:450:1
312 LL | / #[suggestion(parser::add_paren, code = "...")]
320 error: unsupported type attribute for subdiagnostic enum
321 --> $DIR/subdiagnostic-derive.rs:465:1
326 error: `var` doesn't refer to a field on this type
327 --> $DIR/subdiagnostic-derive.rs:485:39
329 LL | #[suggestion(parser::add_paren, code ="{var}", applicability = "machine-applicable")]
332 error: `var` doesn't refer to a field on this type
333 --> $DIR/subdiagnostic-derive.rs:504:43
335 LL | #[suggestion(parser::add_paren, code ="{var}", applicability = "machine-applicable")]
338 error: cannot find attribute `foo` in this scope
339 --> $DIR/subdiagnostic-derive.rs:63:3
344 error: cannot find attribute `foo` in this scope
345 --> $DIR/subdiagnostic-derive.rs:155:3
350 error: cannot find attribute `bar` in this scope
351 --> $DIR/subdiagnostic-derive.rs:169:7
356 error: cannot find attribute `bar` in this scope
357 --> $DIR/subdiagnostic-derive.rs:181:7
362 error: cannot find attribute `bar` in this scope
363 --> $DIR/subdiagnostic-derive.rs:193:7
368 error: cannot find attribute `bar` in this scope
369 --> $DIR/subdiagnostic-derive.rs:205:7
374 error: cannot find attribute `bar` in this scope
375 --> $DIR/subdiagnostic-derive.rs:266:7
380 error: cannot find attribute `bar` in this scope
381 --> $DIR/subdiagnostic-derive.rs:277:7
386 error: cannot find attribute `bar` in this scope
387 --> $DIR/subdiagnostic-derive.rs:288:7
392 error[E0425]: cannot find value `slug` in module `rustc_errors::fluent`
393 --> $DIR/subdiagnostic-derive.rs:118:9
396 | ^^^^ not found in `rustc_errors::fluent`
398 error: aborting due to 52 previous errors
400 For more information about this error, try `rustc --explain E0425`.