Remove ToPredicate impls that use Binder::dummy
This commit is contained in:
parent
2c7bc5e33c
commit
be76bdf905
27 changed files with 99 additions and 85 deletions
|
@ -669,8 +669,10 @@ impl<'tcx> TypeRelatingDelegate<'tcx> for QueryTypeRelatingDelegate<'_, 'tcx> {
|
|||
self.obligations.push(Obligation {
|
||||
cause: self.cause.clone(),
|
||||
param_env: self.param_env,
|
||||
predicate: ty::PredicateKind::RegionOutlives(ty::OutlivesPredicate(sup, sub))
|
||||
.to_predicate(self.infcx.tcx),
|
||||
predicate: ty::Binder::dummy(ty::PredicateKind::RegionOutlives(ty::OutlivesPredicate(
|
||||
sup, sub,
|
||||
)))
|
||||
.to_predicate(self.infcx.tcx),
|
||||
recursion_depth: 0,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -360,7 +360,8 @@ impl<'infcx, 'tcx> CombineFields<'infcx, 'tcx> {
|
|||
self.obligations.push(Obligation::new(
|
||||
self.trace.cause.clone(),
|
||||
self.param_env,
|
||||
ty::PredicateKind::WellFormed(b_ty.into()).to_predicate(self.infcx.tcx),
|
||||
ty::Binder::dummy(ty::PredicateKind::WellFormed(b_ty.into()))
|
||||
.to_predicate(self.infcx.tcx),
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -463,7 +464,7 @@ impl<'infcx, 'tcx> CombineFields<'infcx, 'tcx> {
|
|||
self.obligations.push(Obligation::new(
|
||||
self.trace.cause.clone(),
|
||||
self.param_env,
|
||||
predicate.to_predicate(self.tcx()),
|
||||
ty::Binder::dummy(predicate).to_predicate(self.tcx()),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,11 +97,11 @@ impl TypeRelation<'tcx> for Sub<'combine, 'infcx, 'tcx> {
|
|||
self.fields.obligations.push(Obligation::new(
|
||||
self.fields.trace.cause.clone(),
|
||||
self.fields.param_env,
|
||||
ty::PredicateKind::Subtype(ty::SubtypePredicate {
|
||||
ty::Binder::dummy(ty::PredicateKind::Subtype(ty::SubtypePredicate {
|
||||
a_is_expected: self.a_is_expected,
|
||||
a,
|
||||
b,
|
||||
})
|
||||
}))
|
||||
.to_predicate(self.tcx()),
|
||||
));
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ pub trait TraitEngine<'tcx>: 'tcx {
|
|||
cause,
|
||||
recursion_depth: 0,
|
||||
param_env,
|
||||
predicate: trait_ref.without_const().to_predicate(infcx.tcx),
|
||||
predicate: ty::Binder::dummy(trait_ref).without_const().to_predicate(infcx.tcx),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
@ -231,6 +231,7 @@ impl Elaborator<'tcx> {
|
|||
None
|
||||
}
|
||||
})
|
||||
.map(ty::Binder::dummy)
|
||||
.map(|predicate_kind| predicate_kind.to_predicate(tcx))
|
||||
.filter(|&predicate| visited.insert(predicate))
|
||||
.map(|predicate| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue