-
Notifications
You must be signed in to change notification settings - Fork 126
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
Consider depending on syn.features=["full"]
#301
Comments
@ModProg that code is gross 😄 I would expect rather something like this: #[derive(derive_more::Debug)]
enum Enum {
#[cfg(unix)]
A = 2,
#[cfg(not(unix))]
A = 3,
} But yes, good catch. I guess we may provide a |
I think assuming that we want the derive_more Debug derive to work for everything that the std Debug derive works for, then the debug feature of derive_more should depend on syn its full feature. |
How bad is compile time for syn its full feature, relative to what we have now? |
Well any of our derives that support enums have this problem. Because it happens when syn tries to parse the enum. |
Maybe this could be considered a bug in syn then? |
I guess, but I don't see how they could do it differently than adding a Probably not in line with syns general approach to parsing. Or they need to include all expressions in |
Do we need a dedicated feature for this in derive_more? Or does it work if the crate that contains the struct enables syn its "full" feature itself? |
Yes, that works, of course. However, given that the |
This is fixed by syn upstream so closing this |
Otherwise this would not work:
The text was updated successfully, but these errors were encountered: