Skip to content

allow custom derives on enums #2117

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
Nov 26, 2021

Conversation

ericseppanen
Copy link
Contributor

Custom derives are just as useful on enums as they are on structs; not supporting this was an oversight.

Adds a test that will fail to compile if the custom derive doesn't work on enums. This test fails without the codegen fix.

Fixes #2116.

@highfive
Copy link

highfive commented Nov 7, 2021

warning Warning warning

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

Custom derives are just as useful on enums as they are on structs; not
supporting this was an oversight.

Adds a test that will fail to compile if the custom derive doesn't work
on enums. This test fails without the codegen fix.
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.

Sorry for the lag here, looks good to me, thanks!

@emilio emilio merged commit 0a24ab3 into rust-lang:master Nov 26, 2021
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.

custom derives don't work on enums
3 participants