Skip to content

Commit 19b8579

Browse files
committed
Address changes of pr 103345
1 parent 40b2218 commit 19b8579

File tree

1 file changed

+46
-46
lines changed
  • compiler/rustc_infer/src/errors

1 file changed

+46
-46
lines changed

compiler/rustc_infer/src/errors/mod.rs

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ pub struct MismatchedStaticLifetime<'a> {
523523
}
524524

525525
#[derive(Diagnostic)]
526-
#[diag(infer::explicit_lifetime_required, code = "E0621")]
526+
#[diag(infer_explicit_lifetime_required, code = "E0621")]
527527
pub struct ExplicitLifetimeRequired<'a> {
528528
#[primary_span]
529529
#[label]
@@ -533,7 +533,7 @@ pub struct ExplicitLifetimeRequired<'a> {
533533
pub named: String,
534534

535535
#[suggestion(
536-
infer::explicit_lifetime_required_sugg,
536+
infer_explicit_lifetime_required_sugg,
537537
code = "{new_ty}",
538538
applicability = "unspecified"
539539
)]
@@ -544,88 +544,88 @@ pub struct ExplicitLifetimeRequired<'a> {
544544

545545
#[derive(Subdiagnostic)]
546546
pub enum ActualImplExplNotes {
547-
#[note(infer::actual_impl_expl_expected_signature_two)]
547+
#[note(infer_actual_impl_expl_expected_signature_two)]
548548
ExpectedSignatureTwo {
549549
leading_ellipsis: bool,
550550
ty_or_sig: String,
551551
trait_path: String,
552552
lifetime_1: usize,
553553
lifetime_2: usize,
554554
},
555-
#[note(infer::actual_impl_expl_expected_signature_any)]
555+
#[note(infer_actual_impl_expl_expected_signature_any)]
556556
ExpectedSignatureAny {
557557
leading_ellipsis: bool,
558558
ty_or_sig: String,
559559
trait_path: String,
560560
lifetime_1: usize,
561561
},
562-
#[note(infer::actual_impl_expl_expected_signature_some)]
562+
#[note(infer_actual_impl_expl_expected_signature_some)]
563563
ExpectedSignatureSome {
564564
leading_ellipsis: bool,
565565
ty_or_sig: String,
566566
trait_path: String,
567567
lifetime_1: usize,
568568
},
569-
#[note(infer::actual_impl_expl_expected_signature_nothing)]
569+
#[note(infer_actual_impl_expl_expected_signature_nothing)]
570570
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)]
572572
ExpectedPassiveTwo {
573573
leading_ellipsis: bool,
574574
ty_or_sig: String,
575575
trait_path: String,
576576
lifetime_1: usize,
577577
lifetime_2: usize,
578578
},
579-
#[note(infer::actual_impl_expl_expected_passive_any)]
579+
#[note(infer_actual_impl_expl_expected_passive_any)]
580580
ExpectedPassiveAny {
581581
leading_ellipsis: bool,
582582
ty_or_sig: String,
583583
trait_path: String,
584584
lifetime_1: usize,
585585
},
586-
#[note(infer::actual_impl_expl_expected_passive_some)]
586+
#[note(infer_actual_impl_expl_expected_passive_some)]
587587
ExpectedPassiveSome {
588588
leading_ellipsis: bool,
589589
ty_or_sig: String,
590590
trait_path: String,
591591
lifetime_1: usize,
592592
},
593-
#[note(infer::actual_impl_expl_expected_passive_nothing)]
593+
#[note(infer_actual_impl_expl_expected_passive_nothing)]
594594
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)]
596596
ExpectedOtherTwo {
597597
leading_ellipsis: bool,
598598
ty_or_sig: String,
599599
trait_path: String,
600600
lifetime_1: usize,
601601
lifetime_2: usize,
602602
},
603-
#[note(infer::actual_impl_expl_expected_other_any)]
603+
#[note(infer_actual_impl_expl_expected_other_any)]
604604
ExpectedOtherAny {
605605
leading_ellipsis: bool,
606606
ty_or_sig: String,
607607
trait_path: String,
608608
lifetime_1: usize,
609609
},
610-
#[note(infer::actual_impl_expl_expected_other_some)]
610+
#[note(infer_actual_impl_expl_expected_other_some)]
611611
ExpectedOtherSome {
612612
leading_ellipsis: bool,
613613
ty_or_sig: String,
614614
trait_path: String,
615615
lifetime_1: usize,
616616
},
617-
#[note(infer::actual_impl_expl_expected_other_nothing)]
617+
#[note(infer_actual_impl_expl_expected_other_nothing)]
618618
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)]
620620
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)]
622622
ButActuallyImplementedForTy {
623623
trait_path: String,
624624
has_lifetime: bool,
625625
lifetime: usize,
626626
ty: String,
627627
},
628-
#[note(infer::actual_impl_expl_but_actually_ty_implements)]
628+
#[note(infer_actual_impl_expl_but_actually_ty_implements)]
629629
ButActuallyTyImplements { trait_path: String, has_lifetime: bool, lifetime: usize, ty: String },
630630
}
631631

@@ -712,15 +712,15 @@ impl ActualImplExplNotes {
712712
}
713713

714714
#[derive(Diagnostic)]
715-
#[diag(infer::trait_placeholder_mismatch)]
715+
#[diag(infer_trait_placeholder_mismatch)]
716716
pub struct TraitPlaceholderMismatch {
717717
#[primary_span]
718718
pub span: Span,
719-
#[label(infer::label_satisfy)]
719+
#[label(label_satisfy)]
720720
pub satisfy_span: Option<Span>,
721-
#[label(infer::label_where)]
721+
#[label(label_where)]
722722
pub where_span: Option<Span>,
723-
#[label(infer::label_dup)]
723+
#[label(label_dup)]
724724
pub dup_span: Option<Span>,
725725
pub def_id: String,
726726
pub trait_def_id: String,
@@ -741,26 +741,26 @@ impl AddToDiagnostic for ConsiderBorrowingParamHelp {
741741
let mut type_param_span: MultiSpan = self.spans.clone().into();
742742
for &span in &self.spans {
743743
// 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);
745745
}
746-
let msg = f(diag, fluent::infer::tid_param_help.into());
746+
let msg = f(diag, fluent::infer_tid_param_help.into());
747747
diag.span_help(type_param_span, msg);
748748
}
749749
}
750750

751751
#[derive(Subdiagnostic)]
752-
#[help(infer::tid_rel_help)]
752+
#[help(infer_tid_rel_help)]
753753
pub struct RelationshipHelp;
754754

755755
#[derive(Diagnostic)]
756-
#[diag(infer::trait_impl_diff)]
756+
#[diag(infer_trait_impl_diff)]
757757
pub struct TraitImplDiff {
758758
#[primary_span]
759-
#[label(infer::found)]
759+
#[label(found)]
760760
pub sp: Span,
761-
#[label(infer::expected)]
761+
#[label(expected)]
762762
pub trait_sp: Span,
763-
#[note(infer::expected_found)]
763+
#[note(expected_found)]
764764
pub note: (),
765765
#[subdiagnostic]
766766
pub param_help: ConsiderBorrowingParamHelp,
@@ -783,11 +783,11 @@ impl AddToDiagnostic for DynTraitConstraintSuggestion {
783783
F: Fn(&mut Diagnostic, SubdiagnosticMessage) -> SubdiagnosticMessage,
784784
{
785785
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());
789789
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());
791791
diag.span_suggestion_verbose(
792792
self.span.shrink_to_hi(),
793793
msg,
@@ -798,12 +798,12 @@ impl AddToDiagnostic for DynTraitConstraintSuggestion {
798798
}
799799

800800
#[derive(Diagnostic)]
801-
#[diag(infer::but_calling_introduces, code = "E0772")]
801+
#[diag(infer_but_calling_introduces, code = "E0772")]
802802
pub struct ButCallingIntroduces {
803-
#[label(infer::label1)]
803+
#[label(label1)]
804804
pub param_ty_span: Span,
805805
#[primary_span]
806-
#[label(infer::label2)]
806+
#[label(label2)]
807807
pub cause_span: Span,
808808

809809
pub has_param_name: bool,
@@ -829,14 +829,14 @@ impl AddToDiagnostic for ReqIntroducedLocations {
829829
F: Fn(&mut Diagnostic, SubdiagnosticMessage) -> SubdiagnosticMessage,
830830
{
831831
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);
833833
}
834834

835835
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);
837837
}
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());
840840
diag.span_note(self.span, msg);
841841
}
842842
}
@@ -851,25 +851,25 @@ impl AddToDiagnostic for MoreTargeted {
851851
F: Fn(&mut Diagnostic, SubdiagnosticMessage) -> SubdiagnosticMessage,
852852
{
853853
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);
855855
diag.set_arg("ident", self.ident);
856856
}
857857
}
858858

859859
#[derive(Diagnostic)]
860-
#[diag(infer::but_needs_to_satisfy, code = "E0759")]
860+
#[diag(infer_but_needs_to_satisfy, code = "E0759")]
861861
pub struct ButNeedsToSatisfy {
862862
#[primary_span]
863863
pub sp: Span,
864-
#[label(infer::influencer)]
864+
#[label(influencer)]
865865
pub influencer_point: Span,
866-
#[label(infer::used_here)]
866+
#[label(used_here)]
867867
pub spans: Vec<Span>,
868-
#[label(infer::require)]
868+
#[label(require)]
869869
pub require_span_as_label: Option<Span>,
870-
#[note(infer::require)]
870+
#[note(require)]
871871
pub require_span_as_note: Option<Span>,
872-
#[note(infer::introduced_by_bound)]
872+
#[note(introduced_by_bound)]
873873
pub bound: Option<Span>,
874874

875875
#[subdiagnostic]

0 commit comments

Comments
 (0)