Give items related to issue 33140 a more meaningful name
This commit is contained in:
parent
20aa2d81e3
commit
9e739b723b
6 changed files with 49 additions and 46 deletions
|
@ -2001,7 +2001,7 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
|
|||
// any associated items and there are no where-clauses.
|
||||
//
|
||||
// We can just arbitrarily drop one of the impls.
|
||||
Some(ty::ImplOverlapKind::Issue33140) => {
|
||||
Some(ty::ImplOverlapKind::FutureCompatOrderDepTraitObjects) => {
|
||||
assert_eq!(other.evaluation, victim.evaluation);
|
||||
DropVictim::Yes
|
||||
}
|
||||
|
|
|
@ -453,7 +453,7 @@ fn report_conflicting_impls<'tcx>(
|
|||
overlap.trait_ref.print_trait_sugared(),
|
||||
overlap.self_ty.map_or_else(String::new, |ty| format!(" for type `{ty}`")),
|
||||
match used_to_be_allowed {
|
||||
Some(FutureCompatOverlapErrorKind::Issue33140) => ": (E0119)",
|
||||
Some(FutureCompatOverlapErrorKind::OrderDepTraitObjects) => ": (E0119)",
|
||||
_ => "",
|
||||
}
|
||||
)
|
||||
|
@ -480,7 +480,7 @@ fn report_conflicting_impls<'tcx>(
|
|||
}
|
||||
Some(kind) => {
|
||||
let lint = match kind {
|
||||
FutureCompatOverlapErrorKind::Issue33140 => ORDER_DEPENDENT_TRAIT_OBJECTS,
|
||||
FutureCompatOverlapErrorKind::OrderDepTraitObjects => ORDER_DEPENDENT_TRAIT_OBJECTS,
|
||||
FutureCompatOverlapErrorKind::LeakCheck => COHERENCE_LEAK_CHECK,
|
||||
};
|
||||
tcx.node_span_lint(
|
||||
|
|
|
@ -11,7 +11,7 @@ pub use rustc_middle::traits::specialization_graph::*;
|
|||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub enum FutureCompatOverlapErrorKind {
|
||||
Issue33140,
|
||||
OrderDepTraitObjects,
|
||||
LeakCheck,
|
||||
}
|
||||
|
||||
|
@ -150,10 +150,10 @@ impl<'tcx> Children {
|
|||
{
|
||||
match overlap_kind {
|
||||
ty::ImplOverlapKind::Permitted { marker: _ } => {}
|
||||
ty::ImplOverlapKind::Issue33140 => {
|
||||
ty::ImplOverlapKind::FutureCompatOrderDepTraitObjects => {
|
||||
*last_lint_mut = Some(FutureCompatOverlapError {
|
||||
error: create_overlap_error(overlap),
|
||||
kind: FutureCompatOverlapErrorKind::Issue33140,
|
||||
kind: FutureCompatOverlapErrorKind::OrderDepTraitObjects,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue