Skip to content

Declare precedence on enum types #1272

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

Merged
merged 3 commits into from
Mar 13, 2018
Merged

Conversation

tmfink
Copy link
Contributor

@tmfink tmfink commented Mar 13, 2018

Fixes issue #1198 where an enum matches the pattern for multiple enum types, such as constified module enum AND rustified enum.

Documents precedence in Builder doc comment.

tmfink added 2 commits March 11, 2018 18:26
If an enum matched a pattern for rustified enum and constified module
enum, then rust code would fail to compile with "ambiguous associated
type" error. We fix the error by giving constified module enum "higher
precedence".

Fixes issue rust-lang#1198
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 good, but CI needs to be green.

Thanks!

@@ -0,0 +1,18 @@
/* automatically generated by rust-bindgen */

#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like CI is not really happy about this (needs expectations for other libclang versions). But does this need to be really a libclang-3.9+ test?

@emilio
Copy link
Contributor

emilio commented Mar 13, 2018

@bors-servo r+

Thanks!

@bors-servo
Copy link

📌 Commit 8c9b3ab has been approved by emilio

@bors-servo
Copy link

⌛ Testing commit 8c9b3ab with merge 22041e1...

bors-servo pushed a commit that referenced this pull request Mar 13, 2018
Declare precedence on enum types

Fixes issue #1198 where an enum matches the pattern for multiple enum types, such as constified module enum AND rustified enum.

Documents precedence in `Builder` doc comment.
@bors-servo
Copy link

☀️ Test successful - status-travis
Approved by: emilio
Pushing 22041e1 to master...

@bors-servo bors-servo merged commit 8c9b3ab into rust-lang:master Mar 13, 2018
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.

4 participants