Skip to content

Generate constants for enums by default #976

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 1 commit into from
Sep 11, 2017
Merged

Generate constants for enums by default #976

merged 1 commit into from
Sep 11, 2017

Conversation

Cldfire
Copy link
Contributor

@Cldfire Cldfire commented Sep 10, 2017

Closes #758.

The first commit does strictly what the issue description described, the second does a small amount of (what I believe is) logic simplification.

Hopefully I didn't miss any tests when adding the --rustified-enum .* flag to the ones that needed it; all of the tests are passing for me, though, so I don't think I did.

@Cldfire Cldfire changed the title Generate constants for enums by default [WIP] Generate constants for enums by default Sep 10, 2017
@Cldfire
Copy link
Contributor Author

Cldfire commented Sep 10, 2017

Whoops, I completely overlooked bindgen-integration and those tests are failing.

My apologies, let me go look into that.

EDIT: There we go, all green.

@Cldfire Cldfire changed the title [WIP] Generate constants for enums by default Generate constants for enums by default Sep 10, 2017
@fitzgen
Copy link
Member

fitzgen commented Sep 11, 2017

Looks great!

Squash these commits into one and we can merge this PR!

Thanks @Cldfire :)

Also simplifies the logic that determines which enum variation gets chosen.
@Cldfire
Copy link
Contributor Author

Cldfire commented Sep 11, 2017

Squashed :)

@fitzgen
Copy link
Member

fitzgen commented Sep 11, 2017

@bors-servo r+

Thanks again @Cldfire!

@bors-servo
Copy link

📌 Commit 89915f9 has been approved by fitzgen

@bors-servo
Copy link

⌛ Testing commit 89915f9 with merge 37af44d...

bors-servo pushed a commit that referenced this pull request Sep 11, 2017
Generate constants for enums by default

Closes #758.

The first commit does strictly what the issue description described, the second does a small amount of (what I believe is) logic simplification.

Hopefully I didn't miss any tests when adding the `--rustified-enum .*` flag to the ones that needed it; all of the tests are passing for me, though, so I don't think I did.
@bors-servo
Copy link

☀️ Test successful - status-travis
Approved by: fitzgen
Pushing 37af44d to master...

@bors-servo bors-servo merged commit 89915f9 into rust-lang:master Sep 11, 2017
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