]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #36904 - camlorn:field_offsets_refactor, r=eddyb
authorbors <bors@rust-lang.org>
Sun, 2 Oct 2016 21:13:27 +0000 (14:13 -0700)
committerGitHub <noreply@github.com>
Sun, 2 Oct 2016 21:13:27 +0000 (14:13 -0700)
Refactor layout to store offsets of fields, not offsets after fields

This is the next PR moving us towards being able to reorder struct fields.

The old code implicitly stored the offset of the first field.  This is inadequate because the first field may no longer be offset 0 in future.  This PR refactors `layout` to use a `offsets` vector instead of a `offset_after_field` vector.


Trivial merge