about summary refs log tree commit diff
path: root/src/rustllvm
diff options
context:
space:
mode:
authorVal Markovic <val@markovic.io>2018-07-04 17:26:45 -0700
committerVal Markovic <val@markovic.io>2018-07-05 09:24:03 -0700
commitdc425e2e64863d4e1aa0f2bb41f7bfa3cd14b558 (patch)
treea0d8472a2f91ff5fafb452e62ffd5a9b00c5547d /src/rustllvm
parentafaa40646542ca1e8fadb7e1d34197237e0fcd19 (diff)
downloadrust-dc425e2e64863d4e1aa0f2bb41f7bfa3cd14b558.tar.gz
rust-dc425e2e64863d4e1aa0f2bb41f7bfa3cd14b558.zip
Clarifying how the alignment of the struct works
The docs were not specifying how to compute the alignment of the struct, so I had to spend some time trying to figure out how that works. Found the answer [on this page](http://camlorn.net/posts/April%202017/rust-struct-field-reordering.html):

> The total size of this struct is 5, but the most-aligned field is b with alignment 2, so we round up to 6 and give the struct an alignment of 2 bytes.
Diffstat (limited to 'src/rustllvm')
0 files changed, 0 insertions, 0 deletions