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

Support autoimpl for enums #31

Merged
merged 7 commits into from
Feb 7, 2023
Merged

Support autoimpl for enums #31

merged 7 commits into from
Feb 7, 2023

Conversation

dhardy
Copy link
Contributor

@dhardy dhardy commented Feb 2, 2023

Add support for #[autoimpl(..)] on enums. Closes #6.

From the point of view of the implementing traits, this is opt-in. The following traits are currently supported: Clone, Copy, Debug, PartialEq, Eq. Not currently supported (because I'm lazy): PartialOrd, Ord.

Autoimpl for enums supports a where clause, but does not support using or ignore clauses. Mostly, this is because of syntactic ambiguity (see #6).

@ycscaly could you please test this?

This includes the addition of ImplTrait::enum_impl and enum_items.
By default these report "enum expansion not supported".
Because I want nice format strings!
@ycscaly
Copy link

ycscaly commented Feb 3, 2023

Yes, I will test this next week. Thank you.

@ycscaly
Copy link

ycscaly commented Feb 6, 2023

Confirmed working, thank you. Please submit a release after merging :)

@dhardy dhardy merged commit 45990e9 into master Feb 7, 2023
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.

Support #[autoimpl] on enums?
2 participants