X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_trait_selection%2Fsrc%2Ftraits%2Frelationships.rs;h=bfa318787e546869e2c0efe8ebcbb679579feaf0;hb=ee6533d7408f1447c028025c883a34c904d25ba4;hp=f844da500328efafa678598aea9f69019317c55b;hpb=8a75c5a9b5d9c48aa576b08faf735b926d0d9a71;p=rust.git diff --git a/compiler/rustc_trait_selection/src/traits/relationships.rs b/compiler/rustc_trait_selection/src/traits/relationships.rs index f844da50032..bfa318787e5 100644 --- a/compiler/rustc_trait_selection/src/traits/relationships.rs +++ b/compiler/rustc_trait_selection/src/traits/relationships.rs @@ -12,7 +12,7 @@ pub(crate) fn update<'tcx, T>( T: TraitEngine<'tcx>, { // (*) binder skipped - if let ty::PredicateKind::Trait(tpred) = obligation.predicate.kind().skip_binder() + if let ty::PredicateKind::Clause(ty::Clause::Trait(tpred)) = obligation.predicate.kind().skip_binder() && let Some(ty) = infcx.shallow_resolve(tpred.self_ty()).ty_vid().map(|t| infcx.root_var(t)) && infcx.tcx.lang_items().sized_trait().map_or(false, |st| st != tpred.trait_ref.def_id) { @@ -26,7 +26,7 @@ pub(crate) fn update<'tcx, T>( .kind() .rebind( // (*) binder moved here - ty::PredicateKind::Trait(tpred.with_self_type(infcx.tcx, new_self_ty)) + ty::PredicateKind::Clause(ty::Clause::Trait(tpred.with_self_type(infcx.tcx, new_self_ty))) ), ); // Don't report overflow errors. Otherwise equivalent to may_hold. @@ -35,7 +35,9 @@ pub(crate) fn update<'tcx, T>( } } - if let ty::PredicateKind::Projection(predicate) = obligation.predicate.kind().skip_binder() { + if let ty::PredicateKind::Clause(ty::Clause::Projection(predicate)) = + obligation.predicate.kind().skip_binder() + { // If the projection predicate (Foo::Bar == X) has X as a non-TyVid, // we need to make it into one. if let Some(vid) = predicate.term.ty().and_then(|ty| ty.ty_vid()) {