diff options
| author | Cameron Hart <cameron.hart@gmail.com> | 2017-01-15 09:49:29 +1100 |
|---|---|---|
| committer | Cameron Hart <cameron.hart@gmail.com> | 2017-04-21 07:32:32 +1000 |
| commit | 4358e35fda66ab7a00215c7f9d50e7c6dc9b801b (patch) | |
| tree | a25741bc07d2a01d06a99d2135a776c61d42e3d5 /src/libsyntax_ext | |
| parent | ddc5d7bd4b9ea3e8a8ccf82cb443e950be311d61 (diff) | |
| download | rust-4358e35fda66ab7a00215c7f9d50e7c6dc9b801b.tar.gz rust-4358e35fda66ab7a00215c7f9d50e7c6dc9b801b.zip | |
Implementation of repr struct alignment RFC 1358.
The main changes around rustc::ty::Layout::struct and rustc_trans:adt: * Added primitive_align field which stores alignment before repr align * Always emit field padding when generating the LLVM struct fields * Added methods for adjusting field indexes from the layout index to the LLVM struct field index 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.
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", |
