*[param_type] type
}
-infer_actual_impl_expl_1 = {$leading_ellipsis ->
+infer_actual_impl_expl_expected = {$leading_ellipsis ->
[true] ...
*[false] {""}
}{$kind ->
*[nothing] {""}
}
-infer_actual_impl_expl_2 = {$kind_2 ->
+infer_actual_impl_expl_but_actually = {$kind_2 ->
[implements_trait] ...but it actually implements `{$trait_path_2}`
[implemented_for_ty] ...but `{$trait_path_2}` is actually implemented for the type `{$ty}`
*[ty_implements] ...but `{$ty}` actually implements `{$trait_path_2}`
#[derive(Subdiagnostic)]
pub enum ActualImplExplNotes {
// Field names have to be different across all variants
- #[note(infer::actual_impl_expl_1)]
- NoteOne {
+ #[note(infer::actual_impl_expl_expected)]
+ Expected {
leading_ellipsis: bool,
kind: &'static str,
ty_or_sig: String,
lifetime_1: usize,
lifetime_2: usize,
},
- #[note(infer::actual_impl_expl_2)]
- NoteTwo {
+ #[note(infer::actual_impl_expl_but_actually)]
+ ButActually {
kind_2: &'static str,
trait_path_2: String,
has_lifetime: bool,
}
};
- let note_1 = ActualImplExplNotes::NoteOne {
+ let note_1 = ActualImplExplNotes::Expected {
leading_ellipsis,
kind,
ty_or_sig,
let lifetime = actual_has_vid.unwrap_or_default();
let note_2 =
- ActualImplExplNotes::NoteTwo { kind_2, trait_path_2, ty, has_lifetime, lifetime };
+ ActualImplExplNotes::ButActually { kind_2, trait_path_2, ty, has_lifetime, lifetime };
vec![note_1, note_2]
}