about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/mir
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2019-07-28 13:44:11 +0200
committerRalf Jung <post@ralfj.de>2019-08-02 23:02:53 +0200
commite590b849b83dd97fe98a39971cd91b692a0cf2a8 (patch)
tree622391b54d6779c4065cbf9822956f0effd19ae4 /src/librustc_codegen_ssa/mir
parentcf048cc115860cc110865f460f3f2b9b4308ad92 (diff)
downloadrust-e590b849b83dd97fe98a39971cd91b692a0cf2a8.tar.gz
rust-e590b849b83dd97fe98a39971cd91b692a0cf2a8.zip
CTFE: simplify Value type by not checking for alignment
Diffstat (limited to 'src/librustc_codegen_ssa/mir')
-rw-r--r--src/librustc_codegen_ssa/mir/operand.rs4
-rw-r--r--src/librustc_codegen_ssa/mir/place.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_codegen_ssa/mir/operand.rs b/src/librustc_codegen_ssa/mir/operand.rs
index 302dcfcc682..5e5804b7265 100644
--- a/src/librustc_codegen_ssa/mir/operand.rs
+++ b/src/librustc_codegen_ssa/mir/operand.rs
@@ -109,8 +109,8 @@ impl<'a, 'tcx, V: CodegenObject> OperandRef<'tcx, V> {
                 let b_llval = bx.const_usize((end - start) as u64);
                 OperandValue::Pair(a_llval, b_llval)
             },
-            ConstValue::ByRef { offset, align, alloc } => {
-                return bx.load_operand(bx.from_const_alloc(layout, align, alloc, offset));
+            ConstValue::ByRef { alloc, offset } => {
+                return bx.load_operand(bx.from_const_alloc(layout, alloc, offset));
             },
         };
 
diff --git a/src/librustc_codegen_ssa/mir/place.rs b/src/librustc_codegen_ssa/mir/place.rs
index b38e58baaf6..a632838ba24 100644
--- a/src/librustc_codegen_ssa/mir/place.rs
+++ b/src/librustc_codegen_ssa/mir/place.rs
@@ -466,8 +466,8 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
                 let layout = cx.layout_of(self.monomorphize(&ty));
                 match bx.tcx().const_eval(param_env.and(cid)) {
                     Ok(val) => match val.val {
-                        mir::interpret::ConstValue::ByRef { offset, align, alloc } => {
-                            bx.cx().from_const_alloc(layout, align, alloc, offset)
+                        mir::interpret::ConstValue::ByRef { alloc, offset } => {
+                            bx.cx().from_const_alloc(layout, alloc, offset)
                         }
                         _ => bug!("promoteds should have an allocation: {:?}", val),
                     },