-
Notifications
You must be signed in to change notification settings - Fork 568
Guarantee repr(C) union field offset
#2128
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
base: master
Are you sure you want to change the base?
Conversation
Makes progress on rust-lang/unsafe-code-guidelines#595
|
r? t-lang (Is that valid r? syntax?) |
|
Failed to set assignee to
|
|
I'm surprised we don't already document this.^^ |
scottmcm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH I think this is so settled that we can just merge it without even an FCP, but cc @rust-lang/lang in case anyone has objections to that.
(It's hard to even argue that it's useful to allow differently even for repr(Rust), so for repr(C) I see absolutely no reason we'd even consider something different.)
|
Team member @traviscross has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
AFAICT, this behavior is widely assumed, and is the intended behavior.
repr(C)unions are designed to match the behavior of C unions, and per the C standard:Makes progress on rust-lang/unsafe-code-guidelines#595