diff options
| author | bors <bors@rust-lang.org> | 2017-04-22 11:50:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-04-22 11:50:40 +0000 |
| commit | 6d841da4a0d7629f826117f99052e3d4a7997a7e (patch) | |
| tree | 27e04604a86c867e8146bf75ff0c1ea973aaf47c /src/libsyntax_ext | |
| parent | ff13b7c91813eb178c98a7abc661acaf5c41dc31 (diff) | |
| parent | 946f8e6a59242a8112c6983d1336fef54bc55b9a (diff) | |
| download | rust-6d841da4a0d7629f826117f99052e3d4a7997a7e.tar.gz rust-6d841da4a0d7629f826117f99052e3d4a7997a7e.zip | |
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.
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/deriving/generic/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax_ext/deriving/generic/mod.rs b/src/libsyntax_ext/deriving/generic/mod.rs index 1ff0fec1c96..e96883c26f3 100644 --- a/src/libsyntax_ext/deriving/generic/mod.rs +++ b/src/libsyntax_ext/deriving/generic/mod.rs @@ -773,7 +773,7 @@ fn find_repr_type_name(diagnostic: &Handler, type_attrs: &[ast::Attribute]) -> & for a in type_attrs { for r in &attr::find_repr_attrs(diagnostic, a) { repr_type_name = match *r { - attr::ReprPacked | attr::ReprSimd => continue, + attr::ReprPacked | attr::ReprSimd | attr::ReprAlign(_) => continue, attr::ReprExtern => "i32", attr::ReprInt(attr::SignedInt(ast::IntTy::Is)) => "isize", |
