about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorColin Pronovost <colin.pron@live.com>2018-09-24 23:09:44 -0400
committerColin Pronovost <colin.pron@live.com>2018-09-24 23:09:44 -0400
commit06b8c3ee5b52dc849259655578afca70cb32dda3 (patch)
tree4107dfbb872b7d7f20c46b46ff29e224521359c0 /src/librustc_codegen_llvm
parent70073ec61d0d56bca45b9bd40659bb75799cd273 (diff)
downloadrust-06b8c3ee5b52dc849259655578afca70cb32dda3.tar.gz
rust-06b8c3ee5b52dc849259655578afca70cb32dda3.zip
Rely only on base alignment and offset for computing field alignment
Fix #54028
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/mir/place.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/librustc_codegen_llvm/mir/place.rs b/src/librustc_codegen_llvm/mir/place.rs
index bc6ebd360e8..e7b6f5908a4 100644
--- a/src/librustc_codegen_llvm/mir/place.rs
+++ b/src/librustc_codegen_llvm/mir/place.rs
@@ -173,10 +173,7 @@ impl PlaceRef<'ll, 'tcx> {
         let cx = bx.cx;
         let field = self.layout.field(cx, ix);
         let offset = self.layout.fields.offset(ix);
-        let effective_field_align = self.align
-            .min(self.layout.align)
-            .min(field.align)
-            .restrict_for_offset(offset);
+        let effective_field_align = self.align.restrict_for_offset(offset);
 
         let simple = || {
             // Unions and newtypes only use an offset of 0.