1
Fork 0

Add constness to ParamEnv

This now causes a lot of queries to be executed twice, as reveal_all forces NotConst
This commit is contained in:
Oli Scherer 2021-10-21 14:56:00 +00:00 committed by Deadbeef
parent 22eeff700e
commit 721ffd14c3
No known key found for this signature in database
GPG key ID: 6D017A96D8E6C2F9
8 changed files with 126 additions and 45 deletions

View file

@ -480,7 +480,7 @@ impl<'a, 'tcx> Lift<'tcx> for ty::ParamEnv<'a> {
type Lifted = ty::ParamEnv<'tcx>;
fn lift_to_tcx(self, tcx: TyCtxt<'tcx>) -> Option<Self::Lifted> {
tcx.lift(self.caller_bounds())
.map(|caller_bounds| ty::ParamEnv::new(caller_bounds, self.reveal()))
.map(|caller_bounds| ty::ParamEnv::new(caller_bounds, self.reveal(), self.constness()))
}
}