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

Move phantom fields to start of struct to avoid interfering with flexible array members #2783

Merged
merged 2 commits into from Mar 19, 2024

Conversation

jsgf
Copy link
Contributor

@jsgf jsgf commented Mar 19, 2024

PR #2772 adds support for representing C flexible array members as Rust DSTs, but these must always be the last field. This moves the PhantomData fields to the front of the structure so they're out of the way.

This is a noisy change as it updates a bunch of test fixtures, but should be a functional no-op.

…ible array members.

Flex array members must always be last. This changed a bunch of tests,
but only in a trivial way.
@emilio emilio merged commit 3b5ce9c into rust-lang:main Mar 19, 2024
33 checks passed
@jsgf jsgf deleted the phantom-to-front branch March 20, 2024 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants