@@ -322,208 +322,200 @@ error: only `no_span` is a valid nested attribute
322322LL |     #[label(no_crate_label, foo("..."))]
323323   |                             ^^^
324324
325- error: `#[primary_span]` is not a valid attribute
326-   --> $DIR/diagnostic-derive.rs:563:5
327-    |
328- LL |     #[primary_span]
329-    |     ^
330-    |
331-    = help: the `primary_span` field attribute is not valid for lint diagnostics
332- 
333325error: `#[error(...)]` is not a valid attribute
334-   --> $DIR/diagnostic-derive.rs:583 :1
326+   --> $DIR/diagnostic-derive.rs:582 :1
335327   |
336328LL | #[error(no_crate_example, code = E0123)]
337329   | ^
338330
339331error: diagnostic slug not specified
340-   --> $DIR/diagnostic-derive.rs:583 :1
332+   --> $DIR/diagnostic-derive.rs:582 :1
341333   |
342334LL | #[error(no_crate_example, code = E0123)]
343335   | ^
344336   |
345337   = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
346338
347339error: `#[warn_(...)]` is not a valid attribute
348-   --> $DIR/diagnostic-derive.rs:590 :1
340+   --> $DIR/diagnostic-derive.rs:589 :1
349341   |
350342LL | #[warn_(no_crate_example, code = E0123)]
351343   | ^
352344
353345error: diagnostic slug not specified
354-   --> $DIR/diagnostic-derive.rs:590 :1
346+   --> $DIR/diagnostic-derive.rs:589 :1
355347   |
356348LL | #[warn_(no_crate_example, code = E0123)]
357349   | ^
358350   |
359351   = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
360352
361353error: `#[lint(...)]` is not a valid attribute
362-   --> $DIR/diagnostic-derive.rs:597 :1
354+   --> $DIR/diagnostic-derive.rs:596 :1
363355   |
364356LL | #[lint(no_crate_example, code = E0123)]
365357   | ^
366358
367359error: diagnostic slug not specified
368-   --> $DIR/diagnostic-derive.rs:597 :1
360+   --> $DIR/diagnostic-derive.rs:596 :1
369361   |
370362LL | #[lint(no_crate_example, code = E0123)]
371363   | ^
372364   |
373365   = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
374366
375367error: `#[lint(...)]` is not a valid attribute
376-   --> $DIR/diagnostic-derive.rs:604 :1
368+   --> $DIR/diagnostic-derive.rs:603 :1
377369   |
378370LL | #[lint(no_crate_example, code = E0123)]
379371   | ^
380372
381373error: `#[lint(...)]` is not a valid attribute
382-   --> $DIR/diagnostic-derive.rs:604 :1
374+   --> $DIR/diagnostic-derive.rs:603 :1
383375   |
384376LL | #[lint(no_crate_example, code = E0123)]
385377   | ^
386378   |
387379   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
388380
389381error: diagnostic slug not specified
390-   --> $DIR/diagnostic-derive.rs:604 :1
382+   --> $DIR/diagnostic-derive.rs:603 :1
391383   |
392384LL | #[lint(no_crate_example, code = E0123)]
393385   | ^
394386   |
395387   = help: specify the slug as the first argument to the attribute, such as `#[diag(compiletest_example)]`
396388
397389error: specified multiple times
398-   --> $DIR/diagnostic-derive.rs:614 :53
390+   --> $DIR/diagnostic-derive.rs:613 :53
399391   |
400392LL |     #[suggestion(no_crate_suggestion, code = "...", code = ",,,")]
401393   |                                                     ^^^^
402394   |
403395note: previously specified here
404-   --> $DIR/diagnostic-derive.rs:614 :39
396+   --> $DIR/diagnostic-derive.rs:613 :39
405397   |
406398LL |     #[suggestion(no_crate_suggestion, code = "...", code = ",,,")]
407399   |                                       ^^^^
408400
409401error: wrong types for suggestion
410-   --> $DIR/diagnostic-derive.rs:623 :24
402+   --> $DIR/diagnostic-derive.rs:622 :24
411403   |
412404LL |     suggestion: (Span, usize),
413405   |                        ^^^^^
414406   |
415407   = help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`
416408
417409error: wrong types for suggestion
418-   --> $DIR/diagnostic-derive.rs:631 :17
410+   --> $DIR/diagnostic-derive.rs:630 :17
419411   |
420412LL |     suggestion: (Span,),
421413   |                 ^^^^^^^
422414   |
423415   = help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`
424416
425417error: suggestion without `code = "..."`
426-   --> $DIR/diagnostic-derive.rs:638 :5
418+   --> $DIR/diagnostic-derive.rs:637 :5
427419   |
428420LL |     #[suggestion(no_crate_suggestion)]
429421   |     ^
430422
431423error: `#[multipart_suggestion(...)]` is not a valid attribute
432-   --> $DIR/diagnostic-derive.rs:645 :1
424+   --> $DIR/diagnostic-derive.rs:644 :1
433425   |
434426LL | #[multipart_suggestion(no_crate_suggestion)]
435427   | ^
436428   |
437429   = help: consider creating a `Subdiagnostic` instead
438430
439431error: `#[multipart_suggestion(...)]` is not a valid attribute
440-   --> $DIR/diagnostic-derive.rs:648 :1
432+   --> $DIR/diagnostic-derive.rs:647 :1
441433   |
442434LL | #[multipart_suggestion()]
443435   | ^
444436   |
445437   = help: consider creating a `Subdiagnostic` instead
446438
447439error: `#[multipart_suggestion(...)]` is not a valid attribute
448-   --> $DIR/diagnostic-derive.rs:652 :5
440+   --> $DIR/diagnostic-derive.rs:651 :5
449441   |
450442LL |     #[multipart_suggestion(no_crate_suggestion)]
451443   |     ^
452444   |
453445   = help: consider creating a `Subdiagnostic` instead
454446
455447error: `#[suggestion(...)]` is not a valid attribute
456-   --> $DIR/diagnostic-derive.rs:660 :1
448+   --> $DIR/diagnostic-derive.rs:659 :1
457449   |
458450LL | #[suggestion(no_crate_suggestion, code = "...")]
459451   | ^
460452   |
461453   = help: `#[label]` and `#[suggestion]` can only be applied to fields
462454
463455error: `#[label]` is not a valid attribute
464-   --> $DIR/diagnostic-derive.rs:669 :1
456+   --> $DIR/diagnostic-derive.rs:668 :1
465457   |
466458LL | #[label]
467459   | ^
468460   |
469461   = help: `#[label]` and `#[suggestion]` can only be applied to fields
470462
471463error: `#[subdiagnostic(...)]` is not a valid attribute
472-   --> $DIR/diagnostic-derive.rs:703 :5
464+   --> $DIR/diagnostic-derive.rs:702 :5
473465   |
474466LL |     #[subdiagnostic(bad)]
475467   |     ^
476468
477469error: `#[subdiagnostic = ...]` is not a valid attribute
478-   --> $DIR/diagnostic-derive.rs:711 :5
470+   --> $DIR/diagnostic-derive.rs:710 :5
479471   |
480472LL |     #[subdiagnostic = "bad"]
481473   |     ^
482474
483475error: `#[subdiagnostic(...)]` is not a valid attribute
484-   --> $DIR/diagnostic-derive.rs:719 :5
476+   --> $DIR/diagnostic-derive.rs:718 :5
485477   |
486478LL |     #[subdiagnostic(bad, bad)]
487479   |     ^
488480
489481error: `#[subdiagnostic(...)]` is not a valid attribute
490-   --> $DIR/diagnostic-derive.rs:727 :5
482+   --> $DIR/diagnostic-derive.rs:726 :5
491483   |
492484LL |     #[subdiagnostic("bad")]
493485   |     ^
494486
495487error: `#[subdiagnostic(...)]` is not a valid attribute
496-   --> $DIR/diagnostic-derive.rs:735 :5
488+   --> $DIR/diagnostic-derive.rs:734 :5
497489   |
498490LL |     #[subdiagnostic(eager)]
499491   |     ^
500492
501493error: `#[subdiagnostic(...)]` is not a valid attribute
502-   --> $DIR/diagnostic-derive.rs:743 :5
494+   --> $DIR/diagnostic-derive.rs:742 :5
503495   |
504496LL |     #[subdiagnostic(eager)]
505497   |     ^
506498
507499error: `#[subdiagnostic(...)]` is not a valid attribute
508-   --> $DIR/diagnostic-derive.rs:764 :5
500+   --> $DIR/diagnostic-derive.rs:763 :5
509501   |
510502LL |     #[subdiagnostic(eager)]
511503   |     ^
512504
513505error: expected at least one string literal for `code(...)`
514-   --> $DIR/diagnostic-derive.rs:795 :23
506+   --> $DIR/diagnostic-derive.rs:794 :23
515507   |
516508LL |     #[suggestion(code())]
517509   |                       ^
518510
519511error: `code(...)` must contain only string literals
520-   --> $DIR/diagnostic-derive.rs:803 :23
512+   --> $DIR/diagnostic-derive.rs:802 :23
521513   |
522514LL |     #[suggestion(code(foo))]
523515   |                       ^^^
524516
525517error: `#[suggestion(...)]` is not a valid attribute
526-   --> $DIR/diagnostic-derive.rs:827 :5
518+   --> $DIR/diagnostic-derive.rs:826 :5
527519   |
528520LL |     #[suggestion(no_crate_suggestion, code = "")]
529521   |     ^
@@ -539,13 +531,13 @@ LL | #[diag = "E0123"]
539531   |        ^ maybe a missing crate `core`?
540532
541533error[E0433]: failed to resolve: maybe a missing crate `core`?
542-   --> $DIR/diagnostic-derive.rs:803 :23
534+   --> $DIR/diagnostic-derive.rs:802 :23
543535   |
544536LL |     #[suggestion(code(foo))]
545537   |                       ^^^ maybe a missing crate `core`?
546538
547539error[E0433]: failed to resolve: maybe a missing crate `core`?
548-   --> $DIR/diagnostic-derive.rs:812 :25
540+   --> $DIR/diagnostic-derive.rs:811 :25
549541   |
550542LL |     #[suggestion(code = 3)]
551543   |                         ^ maybe a missing crate `core`?
@@ -563,43 +555,43 @@ LL |     #[nonsense]
563555   |       ^^^^^^^^
564556
565557error: cannot find attribute `error` in this scope
566-   --> $DIR/diagnostic-derive.rs:583 :3
558+   --> $DIR/diagnostic-derive.rs:582 :3
567559   |
568560LL | #[error(no_crate_example, code = E0123)]
569561   |   ^^^^^
570562
571563error: cannot find attribute `warn_` in this scope
572-   --> $DIR/diagnostic-derive.rs:590 :3
564+   --> $DIR/diagnostic-derive.rs:589 :3
573565   |
574566LL | #[warn_(no_crate_example, code = E0123)]
575567   |   ^^^^^ help: a built-in attribute with a similar name exists: `warn`
576568
577569error: cannot find attribute `lint` in this scope
578-   --> $DIR/diagnostic-derive.rs:597 :3
570+   --> $DIR/diagnostic-derive.rs:596 :3
579571   |
580572LL | #[lint(no_crate_example, code = E0123)]
581573   |   ^^^^ help: a built-in attribute with a similar name exists: `link`
582574
583575error: cannot find attribute `lint` in this scope
584-   --> $DIR/diagnostic-derive.rs:604 :3
576+   --> $DIR/diagnostic-derive.rs:603 :3
585577   |
586578LL | #[lint(no_crate_example, code = E0123)]
587579   |   ^^^^ help: a built-in attribute with a similar name exists: `link`
588580
589581error: cannot find attribute `multipart_suggestion` in this scope
590-   --> $DIR/diagnostic-derive.rs:645 :3
582+   --> $DIR/diagnostic-derive.rs:644 :3
591583   |
592584LL | #[multipart_suggestion(no_crate_suggestion)]
593585   |   ^^^^^^^^^^^^^^^^^^^^
594586
595587error: cannot find attribute `multipart_suggestion` in this scope
596-   --> $DIR/diagnostic-derive.rs:648 :3
588+   --> $DIR/diagnostic-derive.rs:647 :3
597589   |
598590LL | #[multipart_suggestion()]
599591   |   ^^^^^^^^^^^^^^^^^^^^
600592
601593error: cannot find attribute `multipart_suggestion` in this scope
602-   --> $DIR/diagnostic-derive.rs:652 :7
594+   --> $DIR/diagnostic-derive.rs:651 :7
603595   |
604596LL |     #[multipart_suggestion(no_crate_suggestion)]
605597   |       ^^^^^^^^^^^^^^^^^^^^
@@ -611,7 +603,7 @@ LL | #[diag(nonsense, code = E0123)]
611603   |        ^^^^^^^^ not found in `crate::fluent_generated`
612604
613605error[E0425]: cannot find value `__code_34` in this scope
614-   --> $DIR/diagnostic-derive.rs:809 :10
606+   --> $DIR/diagnostic-derive.rs:808 :10
615607   |
616608LL | #[derive(Diagnostic)]
617609   |          ^^^^^^^^^^ not found in this scope
@@ -632,7 +624,7 @@ note: required by a bound in `Diag::<'a, G>::arg`
632624  --> $COMPILER_DIR/rustc_errors/src/diagnostic.rs:LL:CC
633625   = note: this error originates in the macro `with_fn` (in Nightly builds, run with -Z macro-backtrace for more info)
634626
635- error: aborting due to 86  previous errors
627+ error: aborting due to 85  previous errors
636628
637629Some errors have detailed explanations: E0277, E0425, E0433.
638630For more information about an error, try `rustc --explain E0277`.
0 commit comments