Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a8e1186

Browse files
committedNov 1, 2024
Auto merge of #132435 - workingjubilee:rollup-3mgogw9, r=workingjubilee
Rollup of 9 pull requests Successful merges: - #131168 (Fix `target_os` for `mipsel-sony-psx`) - #132209 (Fix validation when lowering `?` trait bounds) - #132294 (Bump Fuchsia) - #132357 (Improve missing_abi lint) - #132385 (compiler: Move `rustc_target::spec::abi::Abi` to `rustc_abi::ExternAbi`) - #132403 (continue `TypingMode` refactor) - #132417 (macOS: Document the difference between Clang's `-darwin` and `-macosx` targets) - #132421 (Remove `""` case from RISC-V `llvm_abiname` match statement) - #132422 (llvm: Match new LLVM 128-bit integer alignment on sparc) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 24254ef + acd839d commit a8e1186

File tree

75 files changed

+364
-220
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+364
-220
lines changed
 

‎compiler/rustc_const_eval/src/interpret/place.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,7 @@ where
540540
)?;
541541
if !mir_assign_valid_types(
542542
*self.tcx,
543+
self.typing_mode(),
543544
self.param_env,
544545
self.layout_of(normalized_place_ty)?,
545546
place.layout,
@@ -870,8 +871,13 @@ where
870871
) -> InterpResult<'tcx> {
871872
// We do NOT compare the types for equality, because well-typed code can
872873
// actually "transmute" `&mut T` to `&T` in an assignment without a cast.
873-
let layout_compat =
874-
mir_assign_valid_types(*self.tcx, self.param_env, src.layout(), dest.layout());
874+
let layout_compat = mir_assign_valid_types(
875+
*self.tcx,
876+
self.typing_mode(),
877+
self.param_env,
878+
src.layout(),
879+
dest.layout(),
880+
);
875881
if !allow_transmute && !layout_compat {
876882
span_bug!(
877883
self.cur_span(),

‎compiler/rustc_const_eval/src/interpret/stack.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -596,12 +596,13 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
596596
return interp_ok(layout);
597597
}
598598

599-
let layout = from_known_layout(self.tcx, self.param_env, layout, || {
600-
let local_ty = frame.body.local_decls[local].ty;
601-
let local_ty =
602-
self.instantiate_from_frame_and_normalize_erasing_regions(frame, local_ty)?;
603-
self.layout_of(local_ty).into()
604-
})?;
599+
let layout =
600+
from_known_layout(self.tcx, self.typing_mode(), self.param_env, layout, || {
601+
let local_ty = frame.body.local_decls[local].ty;
602+
let local_ty =
603+
self.instantiate_from_frame_and_normalize_erasing_regions(frame, local_ty)?;
604+
self.layout_of(local_ty).into()
605+
})?;
605606

606607
// Layouts of locals are requested a lot, so we cache them.
607608
state.layout.set(Some(layout));
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.