-
Notifications
You must be signed in to change notification settings - Fork 28
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
derives panic when a discriminant is given by a macro #16
Comments
Actually, seems like it is |
You may need to enable the "full-syntax" feature here, which enables "syn/full". |
Yeah, just figured that out. Going to make a ticket for |
@bcantrill I don't know if there was ever a
I guess it's sort of more specific than "failed to parse", but there's not enough context to really be useful. Maybe instead of |
Re-opening since I think we can indeed do better on I have it looking like this now:
But I'd like to connect the second message back to the |
Aha, |
Thanks for opening this back up! The failure mode was indeed really confusing -- but your new error message is great, and would have sent me to the right spot more or less immediately; thanks again! |
If you use set the discriminant of a C-like enum with a macro the derive panics. This happens with both
ToPrimitive
andFromPrimitive
.Minimal example:
Errors with
Cargo.toml:
Rust version:
rustc 1.27.0 (3eda71b00 2018-06-19)
The text was updated successfully, but these errors were encountered: