1
Fork 0

Auto merge of #99521 - fee1-dead-contrib:const_fix_hax, r=oli-obk

Fix hack that remaps env constness.

WARNING: might have perf implications.

Are there any more problems with having a constness in the `ParamEnv` now? :)

r? `@oli-obk`
This commit is contained in:
bors 2022-07-22 12:48:29 +00:00
commit 22d25f21dc
6 changed files with 46 additions and 67 deletions

View file

@ -182,9 +182,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
ty::PredicateKind::Projection(proj_predicate) => self
.deduce_sig_from_projection(
Some(span.0),
pred.0.kind().rebind(
pred.map_bound(|_| proj_predicate).subst(self.tcx, substs),
),
pred.0
.kind()
.rebind(pred.rebind(proj_predicate).subst(self.tcx, substs)),
),
_ => None,
});