From: bors Date: Sat, 22 Apr 2017 11:50:40 +0000 (+0000) Subject: Auto merge of #39999 - bitshifter:struct_align, r=eddyb X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=6d841da4a0d7629f826117f99052e3d4a7997a7e;p=rust.git Auto merge of #39999 - bitshifter:struct_align, r=eddyb Implementation of repr struct alignment RFC 1358. The main changes around rustc::ty::Layout::struct: * Added abi_align field which stores abi alignment before repr align is applied * align field contains transitive repr alignment * Added padding vec which stores padding required after fields The main user of this information is rustc_trans::adt::struct_llfields which determines the LLVM fields to be used by LLVM, including padding fields. A possible future optimisation would be to put the padding Vec in an Option, since it will be unused unless you are using repr align. --- 6d841da4a0d7629f826117f99052e3d4a7997a7e