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

Fix compile on nightly #1836

Merged
merged 1 commit into from
Jul 26, 2015
Merged

Fix compile on nightly #1836

merged 1 commit into from
Jul 26, 2015

Conversation

alexcrichton
Copy link
Member

The lints for C apis were tweaked recently and 0-size structs aren't liked.
These should be empty enums anyway, however, to ensure they're never created.

The lints for C apis were tweaked recently and 0-size structs aren't liked.
These should be empty `enum`s anyway, however, to ensure they're never created.
@rust-highfive
Copy link

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

@tamird
Copy link
Contributor

tamird commented Jul 26, 2015

This technique probably deserves a comment. It suggests that the solution in rust-lang/rust#27267 and some of the fallout fixes in rust-lang/rust#26583 were incorrect (changing from 0-size structs to type aliases of c_void).

@alexcrichton
Copy link
Member Author

@bors: r+ 60e66b3 (now that I see travis passing)

@tamird it kinda just depends what you want to do in each case. I personally prefer to have empty enums as it introduces a new type that's not compatible with c_void (e.g. type is just an alias), but they're both legitimate possibilities.

@bors
Copy link
Contributor

bors commented Jul 26, 2015

⌛ Testing commit 60e66b3 with merge 083fa7c...

bors added a commit that referenced this pull request Jul 26, 2015
The lints for C apis were tweaked recently and 0-size structs aren't liked.
These should be empty `enum`s anyway, however, to ensure they're never created.
@tamird
Copy link
Contributor

tamird commented Jul 26, 2015

cc rust-lang/rust#27303

@bors
Copy link
Contributor

bors commented Jul 26, 2015

@bors bors merged commit 60e66b3 into rust-lang:master Jul 26, 2015
@alexcrichton alexcrichton deleted the fix-nightly branch August 5, 2015 17:20
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