Be conservative about deriving Debug/Default with large alignment #857
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When there is large enough alignment that we might generate padding which has more members that
RUST_DERIVE_IN_ARRAY_LIMIT
, we can break our ability to derive traits. This commit solves this issue conservatively: there are cases where we leave a derive on the table, because in order to know that we could add that derive, we would need to compute padding before we determine whether we can derive.Fixes #648
r? @emilio