Skip to content

Commit 6c19c08

Browse files
committed
More descriptive names for ActualImplExplNotes variants
1 parent 57fdd19 commit 6c19c08

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

compiler/rustc_error_messages/locales/en-US/infer.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ infer_explicit_lifetime_required_sugg = add explicit lifetime `{$named}` to {$id
184184
*[param_type] type
185185
}
186186
187-
infer_actual_impl_expl_1 = {$leading_ellipsis ->
187+
infer_actual_impl_expl_expected = {$leading_ellipsis ->
188188
[true] ...
189189
*[false] {""}
190190
}{$kind ->
@@ -198,7 +198,7 @@ infer_actual_impl_expl_1 = {$leading_ellipsis ->
198198
*[nothing] {""}
199199
}
200200
201-
infer_actual_impl_expl_2 = {$kind_2 ->
201+
infer_actual_impl_expl_but_actually = {$kind_2 ->
202202
[implements_trait] ...but it actually implements `{$trait_path_2}`
203203
[implemented_for_ty] ...but `{$trait_path_2}` is actually implemented for the type `{$ty}`
204204
*[ty_implements] ...but `{$ty}` actually implements `{$trait_path_2}`

compiler/rustc_infer/src/errors/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -545,8 +545,8 @@ pub struct ExplicitLifetimeRequired<'a> {
545545
#[derive(Subdiagnostic)]
546546
pub enum ActualImplExplNotes {
547547
// Field names have to be different across all variants
548-
#[note(infer::actual_impl_expl_1)]
549-
NoteOne {
548+
#[note(infer::actual_impl_expl_expected)]
549+
Expected {
550550
leading_ellipsis: bool,
551551
kind: &'static str,
552552
ty_or_sig: String,
@@ -555,8 +555,8 @@ pub enum ActualImplExplNotes {
555555
lifetime_1: usize,
556556
lifetime_2: usize,
557557
},
558-
#[note(infer::actual_impl_expl_2)]
559-
NoteTwo {
558+
#[note(infer::actual_impl_expl_but_actually)]
559+
ButActually {
560560
kind_2: &'static str,
561561
trait_path_2: String,
562562
has_lifetime: bool,

compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ impl<'tcx> NiceRegionError<'_, 'tcx> {
451451
}
452452
};
453453

454-
let note_1 = ActualImplExplNotes::NoteOne {
454+
let note_1 = ActualImplExplNotes::Expected {
455455
leading_ellipsis,
456456
kind,
457457
ty_or_sig,
@@ -483,7 +483,7 @@ impl<'tcx> NiceRegionError<'_, 'tcx> {
483483
let lifetime = actual_has_vid.unwrap_or_default();
484484

485485
let note_2 =
486-
ActualImplExplNotes::NoteTwo { kind_2, trait_path_2, ty, has_lifetime, lifetime };
486+
ActualImplExplNotes::ButActually { kind_2, trait_path_2, ty, has_lifetime, lifetime };
487487

488488
vec![note_1, note_2]
489489
}

0 commit comments

Comments
 (0)