change map_bound(|_| x
to rebind(x
This commit is contained in:
parent
8464396a19
commit
a0ebb2ed8b
3 changed files with 6 additions and 6 deletions
|
@ -580,7 +580,7 @@ impl<'tcx> Predicate<'tcx> {
|
||||||
if let PredicateKind::Trait(TraitPredicate { trait_ref, constness, polarity }) = self.kind().skip_binder()
|
if let PredicateKind::Trait(TraitPredicate { trait_ref, constness, polarity }) = self.kind().skip_binder()
|
||||||
&& constness != BoundConstness::NotConst
|
&& constness != BoundConstness::NotConst
|
||||||
{
|
{
|
||||||
self = tcx.mk_predicate(self.kind().map_bound(|_| PredicateKind::Trait(TraitPredicate {
|
self = tcx.mk_predicate(self.kind().rebind(PredicateKind::Trait(TraitPredicate {
|
||||||
trait_ref,
|
trait_ref,
|
||||||
constness: BoundConstness::NotConst,
|
constness: BoundConstness::NotConst,
|
||||||
polarity,
|
polarity,
|
||||||
|
|
|
@ -31,14 +31,14 @@ pub(crate) fn update<'tcx, T>(
|
||||||
obligation
|
obligation
|
||||||
.predicate
|
.predicate
|
||||||
.kind()
|
.kind()
|
||||||
.map_bound(|_| {
|
.rebind(
|
||||||
// (*) binder moved here
|
// (*) binder moved here
|
||||||
ty::PredicateKind::Trait(ty::TraitPredicate {
|
ty::PredicateKind::Trait(ty::TraitPredicate {
|
||||||
trait_ref,
|
trait_ref,
|
||||||
constness: tpred.constness,
|
constness: tpred.constness,
|
||||||
polarity: tpred.polarity,
|
polarity: tpred.polarity,
|
||||||
})
|
})
|
||||||
})
|
)
|
||||||
.to_predicate(infcx.tcx),
|
.to_predicate(infcx.tcx),
|
||||||
);
|
);
|
||||||
// Don't report overflow errors. Otherwise equivalent to may_hold.
|
// Don't report overflow errors. Otherwise equivalent to may_hold.
|
||||||
|
|
|
@ -182,9 +182,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||||
ty::PredicateKind::Projection(proj_predicate) => self
|
ty::PredicateKind::Projection(proj_predicate) => self
|
||||||
.deduce_sig_from_projection(
|
.deduce_sig_from_projection(
|
||||||
Some(span.0),
|
Some(span.0),
|
||||||
pred.0.kind().rebind(
|
pred.0
|
||||||
pred.map_bound(|_| proj_predicate).subst(self.tcx, substs),
|
.kind()
|
||||||
),
|
.rebind(pred.rebind(proj_predicate).subst(self.tcx, substs)),
|
||||||
),
|
),
|
||||||
_ => None,
|
_ => None,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue