@@ -523,7 +523,7 @@ pub struct MismatchedStaticLifetime<'a> {
523
523
}
524
524
525
525
#[ derive( Diagnostic ) ]
526
- #[ diag( infer :: explicit_lifetime_required , code = "E0621" ) ]
526
+ #[ diag( infer_explicit_lifetime_required , code = "E0621" ) ]
527
527
pub struct ExplicitLifetimeRequired < ' a > {
528
528
#[ primary_span]
529
529
#[ label]
@@ -533,7 +533,7 @@ pub struct ExplicitLifetimeRequired<'a> {
533
533
pub named : String ,
534
534
535
535
#[ suggestion(
536
- infer :: explicit_lifetime_required_sugg ,
536
+ infer_explicit_lifetime_required_sugg ,
537
537
code = "{new_ty}" ,
538
538
applicability = "unspecified"
539
539
) ]
@@ -544,88 +544,88 @@ pub struct ExplicitLifetimeRequired<'a> {
544
544
545
545
#[ derive( Subdiagnostic ) ]
546
546
pub enum ActualImplExplNotes {
547
- #[ note( infer :: actual_impl_expl_expected_signature_two ) ]
547
+ #[ note( infer_actual_impl_expl_expected_signature_two ) ]
548
548
ExpectedSignatureTwo {
549
549
leading_ellipsis : bool ,
550
550
ty_or_sig : String ,
551
551
trait_path : String ,
552
552
lifetime_1 : usize ,
553
553
lifetime_2 : usize ,
554
554
} ,
555
- #[ note( infer :: actual_impl_expl_expected_signature_any ) ]
555
+ #[ note( infer_actual_impl_expl_expected_signature_any ) ]
556
556
ExpectedSignatureAny {
557
557
leading_ellipsis : bool ,
558
558
ty_or_sig : String ,
559
559
trait_path : String ,
560
560
lifetime_1 : usize ,
561
561
} ,
562
- #[ note( infer :: actual_impl_expl_expected_signature_some ) ]
562
+ #[ note( infer_actual_impl_expl_expected_signature_some ) ]
563
563
ExpectedSignatureSome {
564
564
leading_ellipsis : bool ,
565
565
ty_or_sig : String ,
566
566
trait_path : String ,
567
567
lifetime_1 : usize ,
568
568
} ,
569
- #[ note( infer :: actual_impl_expl_expected_signature_nothing ) ]
569
+ #[ note( infer_actual_impl_expl_expected_signature_nothing ) ]
570
570
ExpectedSignatureNothing { leading_ellipsis : bool , ty_or_sig : String , trait_path : String } ,
571
- #[ note( infer :: actual_impl_expl_expected_passive_two ) ]
571
+ #[ note( infer_actual_impl_expl_expected_passive_two ) ]
572
572
ExpectedPassiveTwo {
573
573
leading_ellipsis : bool ,
574
574
ty_or_sig : String ,
575
575
trait_path : String ,
576
576
lifetime_1 : usize ,
577
577
lifetime_2 : usize ,
578
578
} ,
579
- #[ note( infer :: actual_impl_expl_expected_passive_any ) ]
579
+ #[ note( infer_actual_impl_expl_expected_passive_any ) ]
580
580
ExpectedPassiveAny {
581
581
leading_ellipsis : bool ,
582
582
ty_or_sig : String ,
583
583
trait_path : String ,
584
584
lifetime_1 : usize ,
585
585
} ,
586
- #[ note( infer :: actual_impl_expl_expected_passive_some ) ]
586
+ #[ note( infer_actual_impl_expl_expected_passive_some ) ]
587
587
ExpectedPassiveSome {
588
588
leading_ellipsis : bool ,
589
589
ty_or_sig : String ,
590
590
trait_path : String ,
591
591
lifetime_1 : usize ,
592
592
} ,
593
- #[ note( infer :: actual_impl_expl_expected_passive_nothing ) ]
593
+ #[ note( infer_actual_impl_expl_expected_passive_nothing ) ]
594
594
ExpectedPassiveNothing { leading_ellipsis : bool , ty_or_sig : String , trait_path : String } ,
595
- #[ note( infer :: actual_impl_expl_expected_other_two ) ]
595
+ #[ note( infer_actual_impl_expl_expected_other_two ) ]
596
596
ExpectedOtherTwo {
597
597
leading_ellipsis : bool ,
598
598
ty_or_sig : String ,
599
599
trait_path : String ,
600
600
lifetime_1 : usize ,
601
601
lifetime_2 : usize ,
602
602
} ,
603
- #[ note( infer :: actual_impl_expl_expected_other_any ) ]
603
+ #[ note( infer_actual_impl_expl_expected_other_any ) ]
604
604
ExpectedOtherAny {
605
605
leading_ellipsis : bool ,
606
606
ty_or_sig : String ,
607
607
trait_path : String ,
608
608
lifetime_1 : usize ,
609
609
} ,
610
- #[ note( infer :: actual_impl_expl_expected_other_some ) ]
610
+ #[ note( infer_actual_impl_expl_expected_other_some ) ]
611
611
ExpectedOtherSome {
612
612
leading_ellipsis : bool ,
613
613
ty_or_sig : String ,
614
614
trait_path : String ,
615
615
lifetime_1 : usize ,
616
616
} ,
617
- #[ note( infer :: actual_impl_expl_expected_other_nothing ) ]
617
+ #[ note( infer_actual_impl_expl_expected_other_nothing ) ]
618
618
ExpectedOtherNothing { leading_ellipsis : bool , ty_or_sig : String , trait_path : String } ,
619
- #[ note( infer :: actual_impl_expl_but_actually_implements_trait ) ]
619
+ #[ note( infer_actual_impl_expl_but_actually_implements_trait ) ]
620
620
ButActuallyImplementsTrait { trait_path : String , has_lifetime : bool , lifetime : usize } ,
621
- #[ note( infer :: actual_impl_expl_but_actually_implemented_for_ty ) ]
621
+ #[ note( infer_actual_impl_expl_but_actually_implemented_for_ty ) ]
622
622
ButActuallyImplementedForTy {
623
623
trait_path : String ,
624
624
has_lifetime : bool ,
625
625
lifetime : usize ,
626
626
ty : String ,
627
627
} ,
628
- #[ note( infer :: actual_impl_expl_but_actually_ty_implements ) ]
628
+ #[ note( infer_actual_impl_expl_but_actually_ty_implements ) ]
629
629
ButActuallyTyImplements { trait_path : String , has_lifetime : bool , lifetime : usize , ty : String } ,
630
630
}
631
631
@@ -712,15 +712,15 @@ impl ActualImplExplNotes {
712
712
}
713
713
714
714
#[ derive( Diagnostic ) ]
715
- #[ diag( infer :: trait_placeholder_mismatch ) ]
715
+ #[ diag( infer_trait_placeholder_mismatch ) ]
716
716
pub struct TraitPlaceholderMismatch {
717
717
#[ primary_span]
718
718
pub span : Span ,
719
- #[ label( infer :: label_satisfy) ]
719
+ #[ label( label_satisfy) ]
720
720
pub satisfy_span : Option < Span > ,
721
- #[ label( infer :: label_where) ]
721
+ #[ label( label_where) ]
722
722
pub where_span : Option < Span > ,
723
- #[ label( infer :: label_dup) ]
723
+ #[ label( label_dup) ]
724
724
pub dup_span : Option < Span > ,
725
725
pub def_id : String ,
726
726
pub trait_def_id : String ,
@@ -741,26 +741,26 @@ impl AddToDiagnostic for ConsiderBorrowingParamHelp {
741
741
let mut type_param_span: MultiSpan = self . spans . clone ( ) . into ( ) ;
742
742
for & span in & self . spans {
743
743
// Seems like we can't call f() here as Into<DiagnosticMessage> is required
744
- type_param_span. push_span_label ( span, fluent:: infer :: tid_consider_borrowing ) ;
744
+ type_param_span. push_span_label ( span, fluent:: infer_tid_consider_borrowing ) ;
745
745
}
746
- let msg = f ( diag, fluent:: infer :: tid_param_help . into ( ) ) ;
746
+ let msg = f ( diag, fluent:: infer_tid_param_help . into ( ) ) ;
747
747
diag. span_help ( type_param_span, msg) ;
748
748
}
749
749
}
750
750
751
751
#[ derive( Subdiagnostic ) ]
752
- #[ help( infer :: tid_rel_help ) ]
752
+ #[ help( infer_tid_rel_help ) ]
753
753
pub struct RelationshipHelp ;
754
754
755
755
#[ derive( Diagnostic ) ]
756
- #[ diag( infer :: trait_impl_diff ) ]
756
+ #[ diag( infer_trait_impl_diff ) ]
757
757
pub struct TraitImplDiff {
758
758
#[ primary_span]
759
- #[ label( infer :: found) ]
759
+ #[ label( found) ]
760
760
pub sp : Span ,
761
- #[ label( infer :: expected) ]
761
+ #[ label( expected) ]
762
762
pub trait_sp : Span ,
763
- #[ note( infer :: expected_found) ]
763
+ #[ note( expected_found) ]
764
764
pub note : ( ) ,
765
765
#[ subdiagnostic]
766
766
pub param_help : ConsiderBorrowingParamHelp ,
@@ -783,11 +783,11 @@ impl AddToDiagnostic for DynTraitConstraintSuggestion {
783
783
F : Fn ( & mut Diagnostic , SubdiagnosticMessage ) -> SubdiagnosticMessage ,
784
784
{
785
785
let mut multi_span: MultiSpan = vec ! [ self . span] . into ( ) ;
786
- multi_span. push_span_label ( self . span , fluent:: infer :: dtcs_has_lifetime_req_label ) ;
787
- multi_span. push_span_label ( self . ident . span , fluent:: infer :: dtcs_introduces_requirement ) ;
788
- let msg = f ( diag, fluent:: infer :: dtcs_has_req_note . into ( ) ) ;
786
+ multi_span. push_span_label ( self . span , fluent:: infer_dtcs_has_lifetime_req_label ) ;
787
+ multi_span. push_span_label ( self . ident . span , fluent:: infer_dtcs_introduces_requirement ) ;
788
+ let msg = f ( diag, fluent:: infer_dtcs_has_req_note . into ( ) ) ;
789
789
diag. span_note ( multi_span, msg) ;
790
- let msg = f ( diag, fluent:: infer :: dtcs_suggestion . into ( ) ) ;
790
+ let msg = f ( diag, fluent:: infer_dtcs_suggestion . into ( ) ) ;
791
791
diag. span_suggestion_verbose (
792
792
self . span . shrink_to_hi ( ) ,
793
793
msg,
@@ -798,12 +798,12 @@ impl AddToDiagnostic for DynTraitConstraintSuggestion {
798
798
}
799
799
800
800
#[ derive( Diagnostic ) ]
801
- #[ diag( infer :: but_calling_introduces , code = "E0772" ) ]
801
+ #[ diag( infer_but_calling_introduces , code = "E0772" ) ]
802
802
pub struct ButCallingIntroduces {
803
- #[ label( infer :: label1) ]
803
+ #[ label( label1) ]
804
804
pub param_ty_span : Span ,
805
805
#[ primary_span]
806
- #[ label( infer :: label2) ]
806
+ #[ label( label2) ]
807
807
pub cause_span : Span ,
808
808
809
809
pub has_param_name : bool ,
@@ -829,14 +829,14 @@ impl AddToDiagnostic for ReqIntroducedLocations {
829
829
F : Fn ( & mut Diagnostic , SubdiagnosticMessage ) -> SubdiagnosticMessage ,
830
830
{
831
831
for sp in self . spans {
832
- self . span . push_span_label ( sp, fluent:: infer :: ril_introduced_here ) ;
832
+ self . span . push_span_label ( sp, fluent:: infer_ril_introduced_here ) ;
833
833
}
834
834
835
835
if self . add_label {
836
- self . span . push_span_label ( self . fn_decl_span , fluent:: infer :: ril_introduced_by ) ;
836
+ self . span . push_span_label ( self . fn_decl_span , fluent:: infer_ril_introduced_by ) ;
837
837
}
838
- self . span . push_span_label ( self . cause_span , fluent:: infer :: ril_because_of ) ;
839
- let msg = f ( diag, fluent:: infer :: ril_static_introduced_by . into ( ) ) ;
838
+ self . span . push_span_label ( self . cause_span , fluent:: infer_ril_because_of ) ;
839
+ let msg = f ( diag, fluent:: infer_ril_static_introduced_by . into ( ) ) ;
840
840
diag. span_note ( self . span , msg) ;
841
841
}
842
842
}
@@ -851,25 +851,25 @@ impl AddToDiagnostic for MoreTargeted {
851
851
F : Fn ( & mut Diagnostic , SubdiagnosticMessage ) -> SubdiagnosticMessage ,
852
852
{
853
853
diag. code ( rustc_errors:: error_code!( E0772 ) ) ;
854
- diag. set_primary_message ( fluent:: infer :: more_targeted ) ;
854
+ diag. set_primary_message ( fluent:: infer_more_targeted ) ;
855
855
diag. set_arg ( "ident" , self . ident ) ;
856
856
}
857
857
}
858
858
859
859
#[ derive( Diagnostic ) ]
860
- #[ diag( infer :: but_needs_to_satisfy , code = "E0759" ) ]
860
+ #[ diag( infer_but_needs_to_satisfy , code = "E0759" ) ]
861
861
pub struct ButNeedsToSatisfy {
862
862
#[ primary_span]
863
863
pub sp : Span ,
864
- #[ label( infer :: influencer) ]
864
+ #[ label( influencer) ]
865
865
pub influencer_point : Span ,
866
- #[ label( infer :: used_here) ]
866
+ #[ label( used_here) ]
867
867
pub spans : Vec < Span > ,
868
- #[ label( infer :: require) ]
868
+ #[ label( require) ]
869
869
pub require_span_as_label : Option < Span > ,
870
- #[ note( infer :: require) ]
870
+ #[ note( require) ]
871
871
pub require_span_as_note : Option < Span > ,
872
- #[ note( infer :: introduced_by_bound) ]
872
+ #[ note( introduced_by_bound) ]
873
873
pub bound : Option < Span > ,
874
874
875
875
#[ subdiagnostic]
0 commit comments