Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarifying how the alignment of the struct works #52064

Merged
merged 1 commit into from
Jul 11, 2018

Commits on Jul 5, 2018

  1. 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.
    Valloric committed Jul 5, 2018
    Configuration menu
    Copy the full SHA
    dc425e2 View commit details
    Browse the repository at this point in the history