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)
{
.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_ty(infcx.tcx, new_self_ty)))
),
);
// Don't report overflow errors. Otherwise equivalent to may_hold.
}
}
- 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()) {