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

Correct repr(Rust) overlapping fields rule for enums and unions #1704

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

GKFX
Copy link
Contributor

@GKFX GKFX commented Dec 24, 2024

As currently written, the reference seems to say that the fields of a repr(Rust) union do not overlap, and that all fields of an enum do not overlap, which is not true. It looks like this line in the reference was written for structs only, but it actually applies to all three kinds of type so needs adjustment.

@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Dec 24, 2024
@rustbot
Copy link
Collaborator

rustbot commented Dec 30, 2024

☔ The latest upstream changes (possibly acd6794) made this pull request unmergeable. Please resolve the merge conflicts.

@chorman0773
Copy link
Contributor

This is handled in #1654 btw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: The marked PR is awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants