Rename subdiagnostic fields that do not need to be unique now
This commit is contained in:
parent
eb7ce1703b
commit
40b221814e
@ -233,15 +233,15 @@ infer_actual_impl_expl_expected_other_nothing = {$leading_ellipsis ->
|
|||||||
*[false] {""}
|
*[false] {""}
|
||||||
}`{$ty_or_sig}` must implement `{$trait_path}`
|
}`{$ty_or_sig}` must implement `{$trait_path}`
|
||||||
|
|
||||||
infer_actual_impl_expl_but_actually_implements_trait = ...but it actually implements `{$trait_path_2}`{$has_lifetime ->
|
infer_actual_impl_expl_but_actually_implements_trait = ...but it actually implements `{$trait_path}`{$has_lifetime ->
|
||||||
[true] , for some specific lifetime `'{$lifetime}`
|
[true] , for some specific lifetime `'{$lifetime}`
|
||||||
*[false] {""}
|
*[false] {""}
|
||||||
}
|
}
|
||||||
infer_actual_impl_expl_but_actually_implemented_for_ty = ...but `{$trait_path_2}` is actually implemented for the type `{$ty}`{$has_lifetime ->
|
infer_actual_impl_expl_but_actually_implemented_for_ty = ...but `{$trait_path}` is actually implemented for the type `{$ty}`{$has_lifetime ->
|
||||||
[true] , for some specific lifetime `'{$lifetime}`
|
[true] , for some specific lifetime `'{$lifetime}`
|
||||||
*[false] {""}
|
*[false] {""}
|
||||||
}
|
}
|
||||||
infer_actual_impl_expl_but_actually_ty_implements = ...but `{$ty}` actually implements `{$trait_path_2}`{$has_lifetime ->
|
infer_actual_impl_expl_but_actually_ty_implements = ...but `{$ty}` actually implements `{$trait_path}`{$has_lifetime ->
|
||||||
[true] , for some specific lifetime `'{$lifetime}`
|
[true] , for some specific lifetime `'{$lifetime}`
|
||||||
*[false] {""}
|
*[false] {""}
|
||||||
}
|
}
|
||||||
|
@ -617,21 +617,16 @@ pub enum ActualImplExplNotes {
|
|||||||
#[note(infer::actual_impl_expl_expected_other_nothing)]
|
#[note(infer::actual_impl_expl_expected_other_nothing)]
|
||||||
ExpectedOtherNothing { leading_ellipsis: bool, ty_or_sig: String, trait_path: String },
|
ExpectedOtherNothing { leading_ellipsis: bool, ty_or_sig: String, trait_path: String },
|
||||||
#[note(infer::actual_impl_expl_but_actually_implements_trait)]
|
#[note(infer::actual_impl_expl_but_actually_implements_trait)]
|
||||||
ButActuallyImplementsTrait { trait_path_2: String, has_lifetime: bool, lifetime: usize },
|
ButActuallyImplementsTrait { trait_path: String, has_lifetime: bool, lifetime: usize },
|
||||||
#[note(infer::actual_impl_expl_but_actually_implemented_for_ty)]
|
#[note(infer::actual_impl_expl_but_actually_implemented_for_ty)]
|
||||||
ButActuallyImplementedForTy {
|
ButActuallyImplementedForTy {
|
||||||
trait_path_2: String,
|
trait_path: String,
|
||||||
has_lifetime: bool,
|
has_lifetime: bool,
|
||||||
lifetime: usize,
|
lifetime: usize,
|
||||||
ty: String,
|
ty: String,
|
||||||
},
|
},
|
||||||
#[note(infer::actual_impl_expl_but_actually_ty_implements)]
|
#[note(infer::actual_impl_expl_but_actually_ty_implements)]
|
||||||
ButActuallyTyImplements {
|
ButActuallyTyImplements { trait_path: String, has_lifetime: bool, lifetime: usize, ty: String },
|
||||||
trait_path_2: String,
|
|
||||||
has_lifetime: bool,
|
|
||||||
lifetime: usize,
|
|
||||||
ty: String,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum ActualImplExpectedKind {
|
pub enum ActualImplExpectedKind {
|
||||||
|
@ -474,27 +474,22 @@ impl<'tcx> NiceRegionError<'_, 'tcx> {
|
|||||||
None => true,
|
None => true,
|
||||||
};
|
};
|
||||||
|
|
||||||
let trait_path_2 = actual_trait_ref.map(|tr| tr.print_only_trait_path()).to_string();
|
let trait_path = actual_trait_ref.map(|tr| tr.print_only_trait_path()).to_string();
|
||||||
let ty = actual_trait_ref.map(|tr| tr.self_ty()).to_string();
|
let ty = actual_trait_ref.map(|tr| tr.self_ty()).to_string();
|
||||||
let has_lifetime = actual_has_vid.is_some();
|
let has_lifetime = actual_has_vid.is_some();
|
||||||
let lifetime = actual_has_vid.unwrap_or_default();
|
let lifetime = actual_has_vid.unwrap_or_default();
|
||||||
|
|
||||||
let note_2 = if same_self_type {
|
let note_2 = if same_self_type {
|
||||||
ActualImplExplNotes::ButActuallyImplementsTrait { trait_path_2, has_lifetime, lifetime }
|
ActualImplExplNotes::ButActuallyImplementsTrait { trait_path, has_lifetime, lifetime }
|
||||||
} else if passive_voice {
|
} else if passive_voice {
|
||||||
ActualImplExplNotes::ButActuallyImplementedForTy {
|
ActualImplExplNotes::ButActuallyImplementedForTy {
|
||||||
trait_path_2,
|
trait_path,
|
||||||
ty,
|
ty,
|
||||||
has_lifetime,
|
has_lifetime,
|
||||||
lifetime,
|
lifetime,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ActualImplExplNotes::ButActuallyTyImplements {
|
ActualImplExplNotes::ButActuallyTyImplements { trait_path, ty, has_lifetime, lifetime }
|
||||||
trait_path_2,
|
|
||||||
ty,
|
|
||||||
has_lifetime,
|
|
||||||
lifetime,
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
vec![note_1, note_2]
|
vec![note_1, note_2]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user