about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/mir
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2021-07-12 20:29:05 +0200
committerRalf Jung <post@ralfj.de>2021-07-14 18:17:49 +0200
commit626605cea02ee5f512f5efae0cd188ae1a7007c7 (patch)
treef5ca5be22c69768e444371f0b64230ab763c3159 /compiler/rustc_codegen_ssa/src/mir
parentd4f7dd670226a4235ea4cf900c14eb9c6a536843 (diff)
downloadrust-626605cea02ee5f512f5efae0cd188ae1a7007c7.tar.gz
rust-626605cea02ee5f512f5efae0cd188ae1a7007c7.zip
consistently treat None-tagged pointers as ints; get rid of some deprecated Scalar methods
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/mir')
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/operand.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/operand.rs b/compiler/rustc_codegen_ssa/src/mir/operand.rs
index 3c42b2cc2ea..3e8386bc88f 100644
--- a/compiler/rustc_codegen_ssa/src/mir/operand.rs
+++ b/compiler/rustc_codegen_ssa/src/mir/operand.rs
@@ -90,10 +90,10 @@ impl<'a, 'tcx, V: CodegenObject> OperandRef<'tcx, V> {
                     Abi::ScalarPair(ref a, _) => a,
                     _ => bug!("from_const: invalid ScalarPair layout: {:#?}", layout),
                 };
-                let a = Scalar::from(Pointer::new(
-                    bx.tcx().create_memory_alloc(data),
-                    Size::from_bytes(start),
-                ));
+                let a = Scalar::from_pointer(
+                    Pointer::new(bx.tcx().create_memory_alloc(data), Size::from_bytes(start)),
+                    &bx.tcx(),
+                );
                 let a_llval = bx.scalar_to_backend(
                     a,
                     a_scalar,