-
-
Notifications
You must be signed in to change notification settings - Fork 311
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
Syn data structures do not implement std::fmt::debug #583
Comments
Look at README, optional features sections, you should enable "extra-traits" feature. |
The "extra-traits" cfg exposes the Debug impl. The feature is off by default because having all those impls increases compile time quite substantially, so you would normally only want it during debugging. From your second link: Line 37 in 6f1b7f2
the |
Build fails since syn::Type only adds an impl for Debug when "extra-traits" feature is enabled. This exposes a feature on typescript-definitions-derive to control whether or not syn's feature is active, and adds a cfg_attr to the derive on `Attrs`. - <dtolnay/syn#583 (comment)>
Build fails since syn::Type only adds an impl for Debug when "extra-traits" feature is enabled. This exposes a feature on typescript-definitions-derive to control whether or not syn's feature is active, and adds a cfg_attr to the derive on `Attrs`. - <dtolnay/syn#583 (comment)>
While trying to build a new procedural macro, I wanted to see what data I was working with, so I tried to use the debug macro and the print line macro, but this does not compile (rust 1.32) since the Debug trait is not implemented.
For reference, see the code below:
Looking at the declaration of the struct, it should have been added since the
ast_struct
macro Adds the debug derive. So I am clueless what causes this.TLDR:
syn::derive::DeriveInput
cannot be formatted using{:?}
because it doesn't implement `std::fmt::Debug``The text was updated successfully, but these errors were encountered: