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

repr(C) on enums #1183

Merged
merged 2 commits into from
Dec 14, 2017
Merged

repr(C) on enums #1183

merged 2 commits into from
Dec 14, 2017

Conversation

fitzgen
Copy link
Member

@fitzgen fitzgen commented Dec 9, 2017

@highfive
Copy link

highfive commented Dec 9, 2017

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

@fitzgen fitzgen force-pushed the repr-c-on-enums branch 2 times, most recently from 978f221 to d43faa4 Compare December 12, 2017 19:05
If we don't, then eddyb's recent layout optimizations will do unexpected things
to them.

We also need to handle empty `enum`s without variants. When `repr(C)` is on a
Rust `enum`, it cannot be empty, so we need to add a dummy.
@fitzgen
Copy link
Member Author

fitzgen commented Dec 12, 2017

@emilio fixed so that both repr(C) and repr(i32) (or whatever) are added. Also fixed other libclang versions test expectations.

@emilio
Copy link
Contributor

emilio commented Dec 14, 2017

@bors-servo r+

@bors-servo
Copy link

📌 Commit 43c43ba has been approved by emilio

@bors-servo
Copy link

⌛ Testing commit 43c43ba with merge 84f8e18...

bors-servo pushed a commit that referenced this pull request Dec 14, 2017
@bors-servo
Copy link

☀️ Test successful - status-travis
Approved by: emilio
Pushing 84f8e18 to master...

@bors-servo bors-servo merged commit 43c43ba into rust-lang:master Dec 14, 2017
@fitzgen fitzgen deleted the repr-c-on-enums branch December 14, 2017 16:52
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.

5 participants