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

Requires explicit discriminator value for every variant #1

Closed
andersk opened this issue Apr 7, 2015 · 2 comments
Closed

Requires explicit discriminator value for every variant #1

andersk opened this issue Apr 7, 2015 · 2 comments

Comments

@andersk
Copy link
Owner

andersk commented Apr 7, 2015

The current macro only works for enum FooBar { Foo = 0, Bar = 1 } and not enum FooBar { Foo, Bar } or enum FooBar { Foo = 0, Bar }.

@andersk
Copy link
Owner Author

andersk commented Apr 8, 2015

Hmm. Even if the macro was somehow adjusted to match variants without explicit discriminators, rust-lang/rust#23898 prevents them from being used in the match statement we generate.

andersk added a commit that referenced this issue Apr 8, 2015
Closes: #1

Signed-off-by: Anders Kaseorg <[email protected]>
@andersk
Copy link
Owner Author

andersk commented Apr 8, 2015

Fixed by e12402c, in a way that I didn’t think was going to be possible!

@andersk andersk closed this as completed Apr 8, 2015
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

No branches or pull requests

1 participant