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

Add subenum-specific proc macros #21

Merged
merged 3 commits into from
Sep 19, 2023

Conversation

Nexelous
Copy link
Contributor

Fixes #20.

Subenum-specific attributes are added by passing them into the subenum's identifier without the # or the surrounding square brackets:
#[subenum(EnumB(derive(Clone)))]

Attributes on specific variants can be added too in the same way.

There's an example in tests/test.rs.

@Nexelous Nexelous marked this pull request as draft September 18, 2023 18:43
@Nexelous Nexelous marked this pull request as ready for review September 18, 2023 18:48
@paholg paholg force-pushed the subenum-specific-proc-macros branch from 22a4f67 to 77d3a50 Compare September 19, 2023 02:12
@paholg
Copy link
Owner

paholg commented Sep 19, 2023

This is awesome; thanks!

@paholg paholg merged commit 59dfdf4 into paholg:main Sep 19, 2023
@smeenai
Copy link

smeenai commented Sep 19, 2023

Thank you!

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.

Possible to derive only for subenum?
3 participants