about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorBen Kimock <kimockb@gmail.com>2023-12-09 15:53:41 -0500
committerBen Kimock <kimockb@gmail.com>2023-12-09 17:13:11 -0500
commitb0a580112b53f3b64abf2d67b6776141d0fa7c44 (patch)
tree6c910c96eda19d6528b8f3c30912c65eb908d54a /compiler/rustc_codegen_ssa/src
parent2b399b52753eac351067e73f4ff0de829443b9a7 (diff)
downloadrust-b0a580112b53f3b64abf2d67b6776141d0fa7c44.tar.gz
rust-b0a580112b53f3b64abf2d67b6776141d0fa7c44.zip
Use immediate_backend_type when reading from a const alloc
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/operand.rs2
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(