diff options
| author | bors <bors@rust-lang.org> | 2023-12-10 17:50:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-12-10 17:50:15 +0000 |
| commit | 7e452c123c5acea813130a9519b34f83795cb856 (patch) | |
| tree | aad33ed6fbd125bbdf76f3ee421cd26fd145fc16 /compiler/rustc_codegen_ssa/src/mir | |
| parent | b9068315db4812abbbef317447e47e0c62d3652f (diff) | |
| parent | b0a580112b53f3b64abf2d67b6776141d0fa7c44 (diff) | |
| download | rust-7e452c123c5acea813130a9519b34f83795cb856.tar.gz rust-7e452c123c5acea813130a9519b34f83795cb856.zip | |
Auto merge of #118791 - saethlin:use-immediate-type, r=nikic
Use immediate_backend_type when reading from a const alloc Fixes https://github.com/rust-lang/rust/issues/118047 r? `@nikic`
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/mir')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/operand.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/operand.rs b/compiler/rustc_codegen_ssa/src/mir/operand.rs index d724f9503bb..feee3ac03d0 100644 --- a/compiler/rustc_codegen_ssa/src/mir/operand.rs +++ b/compiler/rustc_codegen_ssa/src/mir/operand.rs @@ -155,7 +155,7 @@ impl<'a, 'tcx, V: CodegenObject> OperandRef<'tcx, V> { Abi::Scalar(s @ abi::Scalar::Initialized { .. }) => { let size = s.size(bx); assert_eq!(size, layout.size, "abi::Scalar size does not match layout size"); - let val = read_scalar(offset, size, s, bx.backend_type(layout)); + let val = read_scalar(offset, size, s, bx.immediate_backend_type(layout)); OperandRef { val: OperandValue::Immediate(val), layout } } Abi::ScalarPair( |
