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

Custom derive #12

Open
Michael-F-Bryan opened this Issue Aug 11, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@Michael-F-Bryan
Copy link

Michael-F-Bryan commented Aug 11, 2017

Now that custom derives are stable, would this be better done using them instead of a macro_rules macro? That way you can have the FromPrimitive and ToPrimitive trait definitions in enum_primitive and then a enum_primitive_derive crate to do the deriving.

I think something like this is more applicable to macros 1.1 than macros by example, and that way you also fix up long-standing issues like being unable to document each variant.

@cardoe

This comment has been minimized.

Copy link

cardoe commented Aug 30, 2017

fwiw, I've got one published at https://crates.io/crates/enum-primitive-derive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.