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

Detect #pragma pack(...) and make pack(n) where n > 1 opaque #1136

Merged
merged 1 commit into from
Nov 2, 2017

Conversation

fitzgen
Copy link
Member

@fitzgen fitzgen commented Nov 1, 2017

This is a bandaid for #537. It does not fix the underlying issue, which requires #[repr(packed = "N")] support in Rust. However, it does make sure that we don't generate type definitions with the wrong layout, or fail our generated layout tests.

r? @emilio or @pepyakin

@highfive
Copy link

highfive commented Nov 1, 2017

warning Warning warning

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

@bors-servo
Copy link

☔ The latest upstream changes (presumably #1137) made this pull request unmergeable. Please resolve the merge conflicts.

Copy link
Contributor

@emilio emilio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sensible. r=me

This is a bandaid for rust-lang#537. It does *not* fix the underlying issue, which
requires `#[repr(packed = "N")]` support in Rust. However, it does make sure
that we don't generate type definitions with the wrong layout, or fail our
generated layout tests.
@fitzgen
Copy link
Member Author

fitzgen commented Nov 2, 2017

@bors-servo r=emilio

Thanks @emilio :)

@bors-servo
Copy link

📌 Commit 79dbe8b has been approved by emilio

bors-servo pushed a commit that referenced this pull request Nov 2, 2017
Detect `#pragma pack(...)` and make `pack(n)` where `n > 1` opaque

This is a bandaid for #537. It does *not* fix the underlying issue, which requires `#[repr(packed = "N")]` support in Rust. However, it does make sure that we don't generate type definitions with the wrong layout, or fail our generated layout tests.

r? @emilio or @pepyakin
@bors-servo
Copy link

⌛ Testing commit 79dbe8b with merge 761dffc...

@bors-servo
Copy link

💔 Test failed - status-travis

@bors-servo
Copy link

☀️ Test successful - status-travis
Approved by: emilio
Pushing 761dffc to master...

@bors-servo bors-servo merged commit 79dbe8b into rust-lang:master Nov 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants