1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
|
error: unsupported type attribute for diagnostic derive enum
--> $DIR/diagnostic-derive.rs:39:1
|
LL | #[diag(compiletest_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:42:5
|
LL | Foo,
| ^^^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:44:5
|
LL | Bar,
| ^^^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[diag = ...]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:50:1
|
LL | #[diag = "E0123"]
| ^^^^^^^^^^^^^^^^^
error: `#[nonsense(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:55:1
|
LL | #[nonsense(compiletest_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:55:1
|
LL | / #[nonsense(compiletest_example, code = "E0123")]
LL | |
LL | |
LL | |
LL | | struct InvalidStructAttr {}
| |___________________________^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[diag("...")]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:62:8
|
LL | #[diag("E0123")]
| ^^^^^^^
|
= help: a diagnostic slug is required as the first argument
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:62:1
|
LL | / #[diag("E0123")]
LL | |
LL | |
LL | | struct InvalidLitNestedAttr {}
| |______________________________^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[diag(nonsense(...))]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:73:8
|
LL | #[diag(nonsense("foo"), code = "E0123", slug = "foo")]
| ^^^^^^^^^^^^^^^
|
= help: a diagnostic slug is required as the first argument
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:73:1
|
LL | / #[diag(nonsense("foo"), code = "E0123", slug = "foo")]
LL | |
LL | |
LL | | struct InvalidNestedStructAttr1 {}
| |__________________________________^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[diag(nonsense = ...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:79:8
|
LL | #[diag(nonsense = "...", code = "E0123", slug = "foo")]
| ^^^^^^^^^^^^^^^^
|
= help: only `code` is a valid nested attributes following the slug
error: `#[diag(slug = ...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:79:42
|
LL | #[diag(nonsense = "...", code = "E0123", slug = "foo")]
| ^^^^^^^^^^^^
|
= help: only `code` is a valid nested attributes following the slug
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:79:1
|
LL | / #[diag(nonsense = "...", code = "E0123", slug = "foo")]
LL | |
LL | |
LL | |
LL | | struct InvalidNestedStructAttr2 {}
| |__________________________________^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[diag(nonsense = ...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:86:8
|
LL | #[diag(nonsense = 4, code = "E0123", slug = "foo")]
| ^^^^^^^^^^^^
error: `#[diag(slug = ...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:86:38
|
LL | #[diag(nonsense = 4, code = "E0123", slug = "foo")]
| ^^^^^^^^^^^^
|
= help: only `code` is a valid nested attributes following the slug
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:86:1
|
LL | / #[diag(nonsense = 4, code = "E0123", slug = "foo")]
LL | |
LL | |
LL | |
LL | | struct InvalidNestedStructAttr3 {}
| |__________________________________^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[diag(slug = ...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:93:45
|
LL | #[diag(compiletest_example, code = "E0123", slug = "foo")]
| ^^^^^^^^^^^^
|
= help: only `code` is a valid nested attributes following the slug
error: `#[suggestion = ...]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:100:5
|
LL | #[suggestion = "bar"]
| ^^^^^^^^^^^^^^^^^^^^^
error: specified multiple times
--> $DIR/diagnostic-derive.rs:107:8
|
LL | #[diag(compiletest_example, code = "E0456")]
| ^^^^^^^^^^^^^^^^^^^
|
note: previously specified here
--> $DIR/diagnostic-derive.rs:106:8
|
LL | #[diag(compiletest_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^
error: specified multiple times
--> $DIR/diagnostic-derive.rs:107:36
|
LL | #[diag(compiletest_example, code = "E0456")]
| ^^^^^^^
|
note: previously specified here
--> $DIR/diagnostic-derive.rs:106:36
|
LL | #[diag(compiletest_example, code = "E0123")]
| ^^^^^^^
error: specified multiple times
--> $DIR/diagnostic-derive.rs:113:52
|
LL | #[diag(compiletest_example, code = "E0456", code = "E0457")]
| ^^^^^^^
|
note: previously specified here
--> $DIR/diagnostic-derive.rs:113:36
|
LL | #[diag(compiletest_example, code = "E0456", code = "E0457")]
| ^^^^^^^
error: `#[diag(compiletest_example)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:118:29
|
LL | #[diag(compiletest_example, compiletest_example, code = "E0456")]
| ^^^^^^^^^^^^^^^^^^^
|
= help: diagnostic slug must be the first argument
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:123:1
|
LL | struct KindNotProvided {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:126:1
|
LL | / #[diag(code = "E0456")]
LL | |
LL | | struct SlugNotProvided {}
| |_________________________^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
--> $DIR/diagnostic-derive.rs:137:5
|
LL | #[primary_span]
| ^^^^^^^^^^^^^^^
error: `#[nonsense]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:145:5
|
LL | #[nonsense]
| ^^^^^^^^^^^
error: the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
--> $DIR/diagnostic-derive.rs:162:5
|
LL | #[label(label)]
| ^^^^^^^^^^^^^^^
error: `name` doesn't refer to a field on this type
--> $DIR/diagnostic-derive.rs:170:37
|
LL | #[suggestion(suggestion, code = "{name}")]
| ^^^^^^^^
error: invalid format string: expected `'}'` but string was terminated
--> $DIR/diagnostic-derive.rs:175:10
|
LL | #[derive(Diagnostic)]
| ^^^^^^^^^^ expected `'}'` in format string
|
= note: if you intended to print `{`, you can escape it using `{{`
= note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid format string: unmatched `}` found
--> $DIR/diagnostic-derive.rs:185:10
|
LL | #[derive(Diagnostic)]
| ^^^^^^^^^^ unmatched `}` in format string
|
= note: if you intended to print `}`, you can escape it using `}}`
= note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
error: the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
--> $DIR/diagnostic-derive.rs:205:5
|
LL | #[label(label)]
| ^^^^^^^^^^^^^^^
error: suggestion without `code = "..."`
--> $DIR/diagnostic-derive.rs:223:5
|
LL | #[suggestion(suggestion)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: `#[suggestion(nonsense = ...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:231:18
|
LL | #[suggestion(nonsense = "bar")]
| ^^^^^^^^^^^^^^^^
|
= help: only `code` and `applicability` are valid nested attributes
error: suggestion without `code = "..."`
--> $DIR/diagnostic-derive.rs:231:5
|
LL | #[suggestion(nonsense = "bar")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `#[suggestion(msg = ...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:240:18
|
LL | #[suggestion(msg = "bar")]
| ^^^^^^^^^^^
|
= help: only `code` and `applicability` are valid nested attributes
error: suggestion without `code = "..."`
--> $DIR/diagnostic-derive.rs:240:5
|
LL | #[suggestion(msg = "bar")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: wrong field type for suggestion
--> $DIR/diagnostic-derive.rs:263:5
|
LL | / #[suggestion(suggestion, code = "This is suggested code")]
LL | |
LL | | suggestion: Applicability,
| |_____________________________^
|
= help: `#[suggestion(...)]` should be applied to fields of type `Span` or `(Span, Applicability)`
error: specified multiple times
--> $DIR/diagnostic-derive.rs:279:24
|
LL | suggestion: (Span, Span, Applicability),
| ^^^^
|
note: previously specified here
--> $DIR/diagnostic-derive.rs:279:18
|
LL | suggestion: (Span, Span, Applicability),
| ^^^^
error: specified multiple times
--> $DIR/diagnostic-derive.rs:287:33
|
LL | suggestion: (Applicability, Applicability, Span),
| ^^^^^^^^^^^^^
|
note: previously specified here
--> $DIR/diagnostic-derive.rs:287:18
|
LL | suggestion: (Applicability, Applicability, Span),
| ^^^^^^^^^^^^^
error: `#[label = ...]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:294:5
|
LL | #[label = "bar"]
| ^^^^^^^^^^^^^^^^
error: specified multiple times
--> $DIR/diagnostic-derive.rs:445:44
|
LL | #[suggestion(suggestion, code = "...", applicability = "maybe-incorrect")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: previously specified here
--> $DIR/diagnostic-derive.rs:447:24
|
LL | suggestion: (Span, Applicability),
| ^^^^^^^^^^^^^
error: invalid applicability
--> $DIR/diagnostic-derive.rs:453:44
|
LL | #[suggestion(suggestion, code = "...", applicability = "batman")]
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: `#[label(foo)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:516:20
|
LL | #[label(label, foo)]
| ^^^
|
= help: a diagnostic slug must be the first argument to the attribute
error: `#[label(foo = ...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:524:20
|
LL | #[label(label, foo = "...")]
| ^^^^^^^^^^^
error: `#[label(foo(...))]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:532:20
|
LL | #[label(label, foo("..."))]
| ^^^^^^^^^^
error: `#[primary_span]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:545:5
|
LL | #[primary_span]
| ^^^^^^^^^^^^^^^
|
= help: the `primary_span` field attribute is not valid for lint diagnostics
error: `#[error(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:565:1
|
LL | #[error(compiletest_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:565:1
|
LL | / #[error(compiletest_example, code = "E0123")]
LL | |
LL | |
LL | |
LL | | struct ErrorAttribute {}
| |________________________^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[warn_(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:572:1
|
LL | #[warn_(compiletest_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:572:1
|
LL | / #[warn_(compiletest_example, code = "E0123")]
LL | |
LL | |
LL | |
LL | | struct WarnAttribute {}
| |_______________________^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[lint(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:579:1
|
LL | #[lint(compiletest_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:579:1
|
LL | / #[lint(compiletest_example, code = "E0123")]
LL | |
LL | |
LL | |
LL | | struct LintAttributeOnSessionDiag {}
| |____________________________________^
|
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
error: `#[lint(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:586:1
|
LL | #[lint(compiletest_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `#[lint(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:586:1
|
LL | #[lint(compiletest_example, code = "E0123")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: diagnostic slug not specified
--> $DIR/diagnostic-derive.rs:586:1
|
LL | / #[lint(compiletest_example, code = "E0123")]
LL | |
LL | |
LL | |
LL | |
LL | | struct LintAttributeOnLintDiag {}
| |_________________________________^
|
= help: specify the slug as the first argument to the attribute, such as `#[diag(compiletest_example)]`
error: specified multiple times
--> $DIR/diagnostic-derive.rs:596:44
|
LL | #[suggestion(suggestion, code = "...", code = ",,,")]
| ^^^^^^^^^^^^
|
note: previously specified here
--> $DIR/diagnostic-derive.rs:596:30
|
LL | #[suggestion(suggestion, code = "...", code = ",,,")]
| ^^^^^^^^^^^^
error: wrong types for suggestion
--> $DIR/diagnostic-derive.rs:605:24
|
LL | suggestion: (Span, usize),
| ^^^^^
|
= help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`
error: wrong types for suggestion
--> $DIR/diagnostic-derive.rs:613:17
|
LL | suggestion: (Span,),
| ^^^^^^^
|
= help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`
error: suggestion without `code = "..."`
--> $DIR/diagnostic-derive.rs:620:5
|
LL | #[suggestion(suggestion)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: `#[multipart_suggestion(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:627:1
|
LL | #[multipart_suggestion(suggestion)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider creating a `Subdiagnostic` instead
error: `#[multipart_suggestion(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:630:1
|
LL | #[multipart_suggestion()]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider creating a `Subdiagnostic` instead
error: `#[multipart_suggestion(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:634:5
|
LL | #[multipart_suggestion(suggestion)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider creating a `Subdiagnostic` instead
error: `#[suggestion(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:642:1
|
LL | #[suggestion(suggestion, code = "...")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[label]` and `#[suggestion]` can only be applied to fields
error: `#[label]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:651:1
|
LL | #[label]
| ^^^^^^^^
|
= help: `#[label]` and `#[suggestion]` can only be applied to fields
error: `#[subdiagnostic(bad)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:685:21
|
LL | #[subdiagnostic(bad)]
| ^^^
|
= help: `eager` is the only supported nested attribute for `subdiagnostic`
error: `#[subdiagnostic = ...]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:693:5
|
LL | #[subdiagnostic = "bad"]
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `eager` is the only supported nested attribute for `subdiagnostic`
error: `#[subdiagnostic(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:701:5
|
LL | #[subdiagnostic(bad, bad)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `eager` is the only supported nested attribute for `subdiagnostic`
error: `#[subdiagnostic("...")]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:709:21
|
LL | #[subdiagnostic("bad")]
| ^^^^^
|
= help: `eager` is the only supported nested attribute for `subdiagnostic`
error: `#[subdiagnostic(...)]` is not a valid attribute
--> $DIR/diagnostic-derive.rs:717:5
|
LL | #[subdiagnostic(eager)]
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: eager subdiagnostics are not supported on lints
error: expected at least one string literal for `code(...)`
--> $DIR/diagnostic-derive.rs:779:18
|
LL | #[suggestion(code())]
| ^^^^^^
error: `code(...)` must contain only string literals
--> $DIR/diagnostic-derive.rs:787:23
|
LL | #[suggestion(code(foo))]
| ^^^
error: `code = "..."`/`code(...)` must contain only string literals
--> $DIR/diagnostic-derive.rs:795:18
|
LL | #[suggestion(code = 3)]
| ^^^^^^^^
error: cannot find attribute `nonsense` in this scope
--> $DIR/diagnostic-derive.rs:55:3
|
LL | #[nonsense(compiletest_example, code = "E0123")]
| ^^^^^^^^
error: cannot find attribute `nonsense` in this scope
--> $DIR/diagnostic-derive.rs:145:7
|
LL | #[nonsense]
| ^^^^^^^^
error: cannot find attribute `error` in this scope
--> $DIR/diagnostic-derive.rs:565:3
|
LL | #[error(compiletest_example, code = "E0123")]
| ^^^^^
error: cannot find attribute `warn_` in this scope
--> $DIR/diagnostic-derive.rs:572:3
|
LL | #[warn_(compiletest_example, code = "E0123")]
| ^^^^^ help: a built-in attribute with a similar name exists: `warn`
error: cannot find attribute `lint` in this scope
--> $DIR/diagnostic-derive.rs:579:3
|
LL | #[lint(compiletest_example, code = "E0123")]
| ^^^^ help: a built-in attribute with a similar name exists: `link`
error: cannot find attribute `lint` in this scope
--> $DIR/diagnostic-derive.rs:586:3
|
LL | #[lint(compiletest_example, code = "E0123")]
| ^^^^ help: a built-in attribute with a similar name exists: `link`
error: cannot find attribute `multipart_suggestion` in this scope
--> $DIR/diagnostic-derive.rs:627:3
|
LL | #[multipart_suggestion(suggestion)]
| ^^^^^^^^^^^^^^^^^^^^
error: cannot find attribute `multipart_suggestion` in this scope
--> $DIR/diagnostic-derive.rs:630:3
|
LL | #[multipart_suggestion()]
| ^^^^^^^^^^^^^^^^^^^^
error: cannot find attribute `multipart_suggestion` in this scope
--> $DIR/diagnostic-derive.rs:634:7
|
LL | #[multipart_suggestion(suggestion)]
| ^^^^^^^^^^^^^^^^^^^^
error[E0425]: cannot find value `nonsense` in module `rustc_errors::fluent`
--> $DIR/diagnostic-derive.rs:68:8
|
LL | #[diag(nonsense, code = "E0123")]
| ^^^^^^^^ not found in `rustc_errors::fluent`
error[E0277]: the trait bound `Hello: IntoDiagnosticArg` is not satisfied
--> $DIR/diagnostic-derive.rs:338:10
|
LL | #[derive(Diagnostic)]
| ^^^^^^^^^^ the trait `IntoDiagnosticArg` is not implemented for `Hello`
|
= help: normalized in stderr
note: required by a bound in `DiagnosticBuilder::<'a, G>::set_arg`
--> $COMPILER_DIR/rustc_errors/src/diagnostic_builder.rs:LL:CC
|
LL | arg: impl IntoDiagnosticArg,
| ^^^^^^^^^^^^^^^^^ required by this bound in `DiagnosticBuilder::<'a, G>::set_arg`
= note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 83 previous errors
Some errors have detailed explanations: E0277, E0425.
For more information about an error, try `rustc --explain E0277`.
|