diff options
| author | Jubilee <workingjubilee@gmail.com> | 2024-10-31 17:50:43 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-31 17:50:43 -0700 |
| commit | c57b351d38102ca83190deb03cf956a2fa488ff2 (patch) | |
| tree | f8051219dd67caf9fe403dcaac7befa12c49f926 /compiler/rustc_const_eval/src/interpret/stack.rs | |
| parent | 6da4221d96ce6c3b5319e39e6687b3cfe9649895 (diff) | |
| parent | dc750665ae84cdedfbae4d5b3c69f4d20faa14dc (diff) | |
| download | rust-c57b351d38102ca83190deb03cf956a2fa488ff2.tar.gz rust-c57b351d38102ca83190deb03cf956a2fa488ff2.zip | |
Rollup merge of #132403 - lcnr:typing-mode, r=compiler-errors
continue `TypingMode` refactor There are still quite a few places which (indirectly) rely on the `Reveal` of a `ParamEnv`, but we're slowly getting there r? `@compiler-errors`
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/stack.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/stack.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/stack.rs b/compiler/rustc_const_eval/src/interpret/stack.rs index 3bc9f46aea0..50c0446b3cd 100644 --- a/compiler/rustc_const_eval/src/interpret/stack.rs +++ b/compiler/rustc_const_eval/src/interpret/stack.rs @@ -596,12 +596,13 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { return interp_ok(layout); } - let layout = from_known_layout(self.tcx, self.param_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)?; - self.layout_of(local_ty).into() - })?; + let layout = + from_known_layout(self.tcx, self.typing_mode(), self.param_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)?; + self.layout_of(local_ty).into() + })?; // Layouts of locals are requested a lot, so we cache them. state.layout.set(Some(layout)); |
