]> git.lizzy.rs Git - rust.git/blob - src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.stderr
Rollup merge of #103414 - compiler-errors:rpit-print-lt, r=cjgillot
[rust.git] / src / test / 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(parser_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:27
85    |
86 LL | #[label(parser_add_paren, code = "...")]
87    |                           ^^^^^^^^^^^^
88
89 error: `#[label(applicability = ...)]` is not a valid attribute
90   --> $DIR/subdiagnostic-derive.rs:150:27
91    |
92 LL | #[label(parser_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(parser_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(parser_add_paren)]` is not a valid attribute
194   --> $DIR/subdiagnostic-derive.rs:323:27
195    |
196 LL | #[label(parser_add_paren, parser_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:46
221    |
222 LL | #[suggestion(parser_add_paren, code = "...", code = "...")]
223    |                                              ^^^^^^^^^^^^
224    |
225 note: previously specified here
226   --> $DIR/subdiagnostic-derive.rs:379:32
227    |
228 LL | #[suggestion(parser_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(parser_add_paren)]
253    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
254
255 error: invalid applicability
256   --> $DIR/subdiagnostic-derive.rs:430:45
257    |
258 LL | #[suggestion(parser_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(parser_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(parser_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(parser_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(parser_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:42
319    |
320 LL | #[multipart_suggestion(parser_add_paren, code = "...", applicability = "machine-applicable")]
321    |                                          ^^^^^^^^^^^^
322    |
323    = help: only `applicability` is a 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(parser_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(parser_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: cannot find attribute `foo` in this scope
419   --> $DIR/subdiagnostic-derive.rs:63:3
420    |
421 LL | #[foo]
422    |   ^^^
423
424 error: cannot find attribute `foo` in this scope
425   --> $DIR/subdiagnostic-derive.rs:159:3
426    |
427 LL | #[foo]
428    |   ^^^
429
430 error: cannot find attribute `bar` in this scope
431   --> $DIR/subdiagnostic-derive.rs:173:7
432    |
433 LL |     #[bar]
434    |       ^^^
435
436 error: cannot find attribute `bar` in this scope
437   --> $DIR/subdiagnostic-derive.rs:185:7
438    |
439 LL |     #[bar = "..."]
440    |       ^^^
441
442 error: cannot find attribute `bar` in this scope
443   --> $DIR/subdiagnostic-derive.rs:197:7
444    |
445 LL |     #[bar = 4]
446    |       ^^^
447
448 error: cannot find attribute `bar` in this scope
449   --> $DIR/subdiagnostic-derive.rs:209:7
450    |
451 LL |     #[bar("...")]
452    |       ^^^
453
454 error: cannot find attribute `bar` in this scope
455   --> $DIR/subdiagnostic-derive.rs:270:7
456    |
457 LL |     #[bar]
458    |       ^^^
459
460 error: cannot find attribute `bar` in this scope
461   --> $DIR/subdiagnostic-derive.rs:281:7
462    |
463 LL |     #[bar = "..."]
464    |       ^^^
465
466 error: cannot find attribute `bar` in this scope
467   --> $DIR/subdiagnostic-derive.rs:292:7
468    |
469 LL |     #[bar("...")]
470    |       ^^^
471
472 error[E0425]: cannot find value `slug` in module `rustc_errors::fluent`
473   --> $DIR/subdiagnostic-derive.rs:122:9
474    |
475 LL | #[label(slug)]
476    |         ^^^^ not found in `rustc_errors::fluent`
477
478 error: aborting due to 67 previous errors
479
480 For more information about this error, try `rustc --explain E0425`.