diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2019-03-04 03:21:11 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2019-03-04 03:54:17 +0100 |
commit | 9134679a98703879ddd081fe14b64cfae074de4a (patch) | |
tree | 5fbfa8eb722f630ebd59c5d3213daff671882511 /src/codegen/struct_layout.rs | |
parent | ed6e1bbec439e8b260e6e701379fc70d295f35fe (diff) |
codegen: Properly track alignment of unions.
This makes us not unnecessarily add repr(align) to unions.
Closes #1498.
Diffstat (limited to 'src/codegen/struct_layout.rs')
-rw-r--r-- | src/codegen/struct_layout.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/codegen/struct_layout.rs b/src/codegen/struct_layout.rs index 921ab215..29d281aa 100644 --- a/src/codegen/struct_layout.rs +++ b/src/codegen/struct_layout.rs @@ -85,9 +85,9 @@ impl<'a> StructLayoutTracker<'a> { name: &'a str, ) -> Self { StructLayoutTracker { - name: name, - ctx: ctx, - comp: comp, + name, + ctx, + comp, is_packed: comp.is_packed(ctx, &ty.layout(ctx)), latest_offset: 0, padding_count: 0, |