InterpCx store TypingEnv instead of a ParamEnv

This commit is contained in:
lcnr
2024-11-19 20:10:42 +01:00
parent b9dea31ea9
commit 7a90e84f4d
36 changed files with 167 additions and 192 deletions

View File

@@ -379,7 +379,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
for &const_ in body.required_consts() {
let c =
self.instantiate_from_current_frame_and_normalize_erasing_regions(const_.const_)?;
c.eval(*self.tcx, self.typing_env(), const_.span).map_err(|err| {
c.eval(*self.tcx, self.typing_env, const_.span).map_err(|err| {
err.emit_note(*self.tcx);
err
})?;
@@ -596,7 +596,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
return interp_ok(layout);
}
let layout = from_known_layout(self.tcx, self.typing_env(), layout, || {
let layout = from_known_layout(self.tcx, self.typing_env, layout, || {
let local_ty = frame.body.local_decls[local].ty;
let local_ty =
self.instantiate_from_frame_and_normalize_erasing_regions(frame, local_ty)?;