@@ -461,15 +461,15 @@ pub struct GenericParamWrongOrder {
461461 pub correct_order : String ,
462462}
463463
464- #[ derive( SessionDiagnostic ) ]
464+ #[ derive( Diagnostic ) ]
465465#[ diag( ast_passes:: obsolete_auto_trait_syntax) ]
466466#[ help]
467467pub struct ObsoleteAutoTraitSyntax {
468468 #[ primary_span]
469469 pub span : Span ,
470470}
471471
472- #[ derive( SessionDiagnostic ) ]
472+ #[ derive( Diagnostic ) ]
473473#[ diag( ast_passes:: unsafe_negative_impl, code = "E0198" ) ]
474474pub struct UnsafeNegativeImpl {
475475 #[ primary_span]
@@ -480,7 +480,7 @@ pub struct UnsafeNegativeImpl {
480480 pub unsafe_span : Span ,
481481}
482482
483- #[ derive( SessionDiagnostic ) ]
483+ #[ derive( Diagnostic ) ]
484484#[ diag( ast_passes:: unsafe_inherent_impl, code = "E0197" ) ]
485485pub struct UnsafeInherentImpl {
486486 #[ primary_span]
@@ -490,7 +490,7 @@ pub struct UnsafeInherentImpl {
490490 pub unsafe_span : Span ,
491491}
492492
493- #[ derive( SessionDiagnostic ) ]
493+ #[ derive( Diagnostic ) ]
494494#[ diag( ast_passes:: negative_inherent_impl) ]
495495pub struct NegativeInherentImpl {
496496 #[ primary_span]
@@ -500,7 +500,7 @@ pub struct NegativeInherentImpl {
500500 pub negative_span : Span ,
501501}
502502
503- #[ derive( SessionDiagnostic ) ]
503+ #[ derive( Diagnostic ) ]
504504#[ diag( ast_passes:: default_inherent_impl) ]
505505#[ note]
506506pub struct DefaultInherentImpl {
@@ -511,7 +511,7 @@ pub struct DefaultInherentImpl {
511511 pub default_span : Span ,
512512}
513513
514- #[ derive( SessionDiagnostic ) ]
514+ #[ derive( Diagnostic ) ]
515515#[ diag( ast_passes:: const_inherent_impl) ]
516516#[ note]
517517pub struct ConstInherentImpl {
@@ -522,50 +522,50 @@ pub struct ConstInherentImpl {
522522 pub const_span : Span ,
523523}
524524
525- #[ derive( SessionDiagnostic ) ]
525+ #[ derive( Diagnostic ) ]
526526#[ diag( ast_passes:: unsafe_extern_block) ]
527527pub struct UnsafeExternBlock {
528528 #[ primary_span]
529529 pub span : Span ,
530530}
531531
532- #[ derive( SessionDiagnostic ) ]
532+ #[ derive( Diagnostic ) ]
533533#[ diag( ast_passes:: unsafe_module) ]
534534pub struct UnsafeModule {
535535 #[ primary_span]
536536 pub span : Span ,
537537}
538538
539- #[ derive( SessionDiagnostic ) ]
539+ #[ derive( Diagnostic ) ]
540540#[ diag( ast_passes:: empty_union) ]
541541pub struct EmptyUnion {
542542 #[ primary_span]
543543 pub span : Span ,
544544}
545545
546- #[ derive( SessionDiagnostic ) ]
546+ #[ derive( Diagnostic ) ]
547547#[ diag( ast_passes:: ty_alias_with_where_clause) ]
548548#[ note]
549549pub struct TyAliasWithWhereClause {
550550 #[ primary_span]
551551 pub span : Span ,
552552}
553553
554- #[ derive( SessionDiagnostic ) ]
554+ #[ derive( Diagnostic ) ]
555555#[ diag( ast_passes:: generic_param_with_default_not_trailing) ]
556556pub struct GenericParamWithDefaultNotTrailing {
557557 #[ primary_span]
558558 pub span : Span ,
559559}
560560
561- #[ derive( SessionDiagnostic ) ]
561+ #[ derive( Diagnostic ) ]
562562#[ diag( ast_passes:: lifetime_nested_quantification, code = "E0316" ) ]
563563pub struct LifetimeNestedQuantification {
564564 #[ primary_span]
565565 pub span : Span ,
566566}
567567
568- #[ derive( SessionDiagnostic ) ]
568+ #[ derive( Diagnostic ) ]
569569#[ diag( ast_passes:: super_trait_with_maybe) ]
570570#[ note]
571571pub struct SuperTraitWithMaybe {
@@ -574,14 +574,14 @@ pub struct SuperTraitWithMaybe {
574574 pub path_str : String ,
575575}
576576
577- #[ derive( SessionDiagnostic ) ]
577+ #[ derive( Diagnostic ) ]
578578#[ diag( ast_passes:: trait_object_with_maybe) ]
579579pub struct TraitObjectWithMaybe {
580580 #[ primary_span]
581581 pub span : Span ,
582582}
583583
584- #[ derive( SessionDiagnostic ) ]
584+ #[ derive( Diagnostic ) ]
585585#[ diag( ast_passes:: forbidden_maybe_const) ]
586586#[ note]
587587pub struct ForbiddenMaybeConst {
@@ -610,14 +610,14 @@ impl AddToDiagnostic for DisallowTildeConstContext {
610610 }
611611}
612612
613- #[ derive( SessionDiagnostic ) ]
613+ #[ derive( Diagnostic ) ]
614614#[ diag( ast_passes:: maybe_const_with_maybe_trait) ]
615615pub struct MaybeConstWithMaybeTrait {
616616 #[ primary_span]
617617 pub span : Span ,
618618}
619619
620- #[ derive( SessionDiagnostic ) ]
620+ #[ derive( Diagnostic ) ]
621621#[ diag( ast_passes:: const_async_fn) ]
622622pub struct ConstAsyncFn {
623623 #[ primary_span]
@@ -630,23 +630,23 @@ pub struct ConstAsyncFn {
630630 pub fn_span : Span ,
631631}
632632
633- #[ derive( SessionDiagnostic ) ]
633+ #[ derive( Diagnostic ) ]
634634#[ diag( ast_passes:: patterns_in_foreign_fns, code = "E0130" ) ]
635635pub struct PatternsInForeignFns {
636636 #[ primary_span]
637637 #[ label]
638638 pub span : Span ,
639639}
640640
641- #[ derive( SessionDiagnostic ) ]
641+ #[ derive( Diagnostic ) ]
642642#[ diag( ast_passes:: patterns_in_fns_without_body, code = "E0642" ) ]
643643pub struct PatternsInFnsWithoutBody {
644644 #[ primary_span]
645645 #[ label]
646646 pub span : Span ,
647647}
648648
649- #[ derive( SessionDiagnostic ) ]
649+ #[ derive( Diagnostic ) ]
650650#[ diag( ast_passes:: equality_constraint) ]
651651#[ note]
652652pub struct EqualityConstraint {
@@ -662,7 +662,7 @@ pub struct EqualityConstraintToAssocConstraintSuggestion {
662662 pub suggestion : Vec < ( Span , String ) > ,
663663}
664664
665- impl AddSubdiagnostic for EqualityConstraintToAssocConstraintSuggestion {
665+ impl AddToDiagnostic for EqualityConstraintToAssocConstraintSuggestion {
666666 fn add_to_diagnostic ( self , diag : & mut Diagnostic ) {
667667 diag. set_arg ( "assoc_ty" , self . assoc_ty ) ;
668668 diag. multipart_suggestion (
0 commit comments