@@ -461,15 +461,15 @@ pub struct GenericParamWrongOrder {
461
461
pub correct_order : String ,
462
462
}
463
463
464
- #[ derive( SessionDiagnostic ) ]
464
+ #[ derive( Diagnostic ) ]
465
465
#[ diag( ast_passes:: obsolete_auto_trait_syntax) ]
466
466
#[ help]
467
467
pub struct ObsoleteAutoTraitSyntax {
468
468
#[ primary_span]
469
469
pub span : Span ,
470
470
}
471
471
472
- #[ derive( SessionDiagnostic ) ]
472
+ #[ derive( Diagnostic ) ]
473
473
#[ diag( ast_passes:: unsafe_negative_impl, code = "E0198" ) ]
474
474
pub struct UnsafeNegativeImpl {
475
475
#[ primary_span]
@@ -480,7 +480,7 @@ pub struct UnsafeNegativeImpl {
480
480
pub unsafe_span : Span ,
481
481
}
482
482
483
- #[ derive( SessionDiagnostic ) ]
483
+ #[ derive( Diagnostic ) ]
484
484
#[ diag( ast_passes:: unsafe_inherent_impl, code = "E0197" ) ]
485
485
pub struct UnsafeInherentImpl {
486
486
#[ primary_span]
@@ -490,7 +490,7 @@ pub struct UnsafeInherentImpl {
490
490
pub unsafe_span : Span ,
491
491
}
492
492
493
- #[ derive( SessionDiagnostic ) ]
493
+ #[ derive( Diagnostic ) ]
494
494
#[ diag( ast_passes:: negative_inherent_impl) ]
495
495
pub struct NegativeInherentImpl {
496
496
#[ primary_span]
@@ -500,7 +500,7 @@ pub struct NegativeInherentImpl {
500
500
pub negative_span : Span ,
501
501
}
502
502
503
- #[ derive( SessionDiagnostic ) ]
503
+ #[ derive( Diagnostic ) ]
504
504
#[ diag( ast_passes:: default_inherent_impl) ]
505
505
#[ note]
506
506
pub struct DefaultInherentImpl {
@@ -511,7 +511,7 @@ pub struct DefaultInherentImpl {
511
511
pub default_span : Span ,
512
512
}
513
513
514
- #[ derive( SessionDiagnostic ) ]
514
+ #[ derive( Diagnostic ) ]
515
515
#[ diag( ast_passes:: const_inherent_impl) ]
516
516
#[ note]
517
517
pub struct ConstInherentImpl {
@@ -522,50 +522,50 @@ pub struct ConstInherentImpl {
522
522
pub const_span : Span ,
523
523
}
524
524
525
- #[ derive( SessionDiagnostic ) ]
525
+ #[ derive( Diagnostic ) ]
526
526
#[ diag( ast_passes:: unsafe_extern_block) ]
527
527
pub struct UnsafeExternBlock {
528
528
#[ primary_span]
529
529
pub span : Span ,
530
530
}
531
531
532
- #[ derive( SessionDiagnostic ) ]
532
+ #[ derive( Diagnostic ) ]
533
533
#[ diag( ast_passes:: unsafe_module) ]
534
534
pub struct UnsafeModule {
535
535
#[ primary_span]
536
536
pub span : Span ,
537
537
}
538
538
539
- #[ derive( SessionDiagnostic ) ]
539
+ #[ derive( Diagnostic ) ]
540
540
#[ diag( ast_passes:: empty_union) ]
541
541
pub struct EmptyUnion {
542
542
#[ primary_span]
543
543
pub span : Span ,
544
544
}
545
545
546
- #[ derive( SessionDiagnostic ) ]
546
+ #[ derive( Diagnostic ) ]
547
547
#[ diag( ast_passes:: ty_alias_with_where_clause) ]
548
548
#[ note]
549
549
pub struct TyAliasWithWhereClause {
550
550
#[ primary_span]
551
551
pub span : Span ,
552
552
}
553
553
554
- #[ derive( SessionDiagnostic ) ]
554
+ #[ derive( Diagnostic ) ]
555
555
#[ diag( ast_passes:: generic_param_with_default_not_trailing) ]
556
556
pub struct GenericParamWithDefaultNotTrailing {
557
557
#[ primary_span]
558
558
pub span : Span ,
559
559
}
560
560
561
- #[ derive( SessionDiagnostic ) ]
561
+ #[ derive( Diagnostic ) ]
562
562
#[ diag( ast_passes:: lifetime_nested_quantification, code = "E0316" ) ]
563
563
pub struct LifetimeNestedQuantification {
564
564
#[ primary_span]
565
565
pub span : Span ,
566
566
}
567
567
568
- #[ derive( SessionDiagnostic ) ]
568
+ #[ derive( Diagnostic ) ]
569
569
#[ diag( ast_passes:: super_trait_with_maybe) ]
570
570
#[ note]
571
571
pub struct SuperTraitWithMaybe {
@@ -574,14 +574,14 @@ pub struct SuperTraitWithMaybe {
574
574
pub path_str : String ,
575
575
}
576
576
577
- #[ derive( SessionDiagnostic ) ]
577
+ #[ derive( Diagnostic ) ]
578
578
#[ diag( ast_passes:: trait_object_with_maybe) ]
579
579
pub struct TraitObjectWithMaybe {
580
580
#[ primary_span]
581
581
pub span : Span ,
582
582
}
583
583
584
- #[ derive( SessionDiagnostic ) ]
584
+ #[ derive( Diagnostic ) ]
585
585
#[ diag( ast_passes:: forbidden_maybe_const) ]
586
586
#[ note]
587
587
pub struct ForbiddenMaybeConst {
@@ -610,14 +610,14 @@ impl AddToDiagnostic for DisallowTildeConstContext {
610
610
}
611
611
}
612
612
613
- #[ derive( SessionDiagnostic ) ]
613
+ #[ derive( Diagnostic ) ]
614
614
#[ diag( ast_passes:: maybe_const_with_maybe_trait) ]
615
615
pub struct MaybeConstWithMaybeTrait {
616
616
#[ primary_span]
617
617
pub span : Span ,
618
618
}
619
619
620
- #[ derive( SessionDiagnostic ) ]
620
+ #[ derive( Diagnostic ) ]
621
621
#[ diag( ast_passes:: const_async_fn) ]
622
622
pub struct ConstAsyncFn {
623
623
#[ primary_span]
@@ -630,23 +630,23 @@ pub struct ConstAsyncFn {
630
630
pub fn_span : Span ,
631
631
}
632
632
633
- #[ derive( SessionDiagnostic ) ]
633
+ #[ derive( Diagnostic ) ]
634
634
#[ diag( ast_passes:: patterns_in_foreign_fns, code = "E0130" ) ]
635
635
pub struct PatternsInForeignFns {
636
636
#[ primary_span]
637
637
#[ label]
638
638
pub span : Span ,
639
639
}
640
640
641
- #[ derive( SessionDiagnostic ) ]
641
+ #[ derive( Diagnostic ) ]
642
642
#[ diag( ast_passes:: patterns_in_fns_without_body, code = "E0642" ) ]
643
643
pub struct PatternsInFnsWithoutBody {
644
644
#[ primary_span]
645
645
#[ label]
646
646
pub span : Span ,
647
647
}
648
648
649
- #[ derive( SessionDiagnostic ) ]
649
+ #[ derive( Diagnostic ) ]
650
650
#[ diag( ast_passes:: equality_constraint) ]
651
651
#[ note]
652
652
pub struct EqualityConstraint {
@@ -662,7 +662,7 @@ pub struct EqualityConstraintToAssocConstraintSuggestion {
662
662
pub suggestion : Vec < ( Span , String ) > ,
663
663
}
664
664
665
- impl AddSubdiagnostic for EqualityConstraintToAssocConstraintSuggestion {
665
+ impl AddToDiagnostic for EqualityConstraintToAssocConstraintSuggestion {
666
666
fn add_to_diagnostic ( self , diag : & mut Diagnostic ) {
667
667
diag. set_arg ( "assoc_ty" , self . assoc_ty ) ;
668
668
diag. multipart_suggestion (
0 commit comments