druid: druid-derive: syn::ty::Type` doesn't implement `std::fmt::Debug
I couldn’t get any Druid project to compile. Was getting some kind of linker error. I went through the crates one by one, attempting to find out where it was breaking.
If I put druid-derive = "0.3.1" into my Cargo.toml dependencies, and try to run nothing but an empty main(). This is the error I get:
Compiling druid-derive v0.3.1
error[E0277]: `syn::ty::Type` doesn't implement `std::fmt::Debug`
--> /home/arif/.cargo/registry/src/github.com-1ecc6299db9ec823/druid-derive-0.3.1/src/attr.rs:65:5
|
65 | pub ty: syn::Type,
| ^^^^^^^^^^^^^^^^^ `syn::ty::Type` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
|
= help: the trait `std::fmt::Debug` is not implemented for `syn::ty::Type`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&syn::ty::Type`
= note: required for the cast to the object type `dyn std::fmt::Debug`
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: `syn::expr::ExprPath` doesn't implement `std::fmt::Debug`
--> /home/arif/.cargo/registry/src/github.com-1ecc6299db9ec823/druid-derive-0.3.1/src/attr.rs:69:5
|
69 | pub same_fn: Option<ExprPath>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `syn::expr::ExprPath` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
|
= help: the trait `std::fmt::Debug` is not implemented for `syn::expr::ExprPath`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `std::option::Option<syn::expr::ExprPath>`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&std::option::Option<syn::expr::ExprPath>`
= note: required for the cast to the object type `dyn std::fmt::Debug`
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (7 by maintainers)
This seems the same as #2373. This should be fixed in
masterbut there is no newdruid-deriverelease yet, pending #2377.It works inside the repo because the
tracingcrate enables theextra-traitsfeature onsyn. #2375 enabled this feature forsynin all cases, which should be the fix.Good to hear it works now 👍 It probably was some bug with that specific nightly version.