arabidopsis / typescript-definitions

Apache License 2.0
71 stars 20 forks source link

Cannot compile: `syn::ty::Type` doesn't implement `std::fmt::Debug` #8

Open phiresky opened 4 years ago

phiresky commented 4 years ago
error[E0277]: `syn::ty::Type` doesn't implement `std::fmt::Debug`
  -->~/.cargo/registry/src/github.com-1ecc6299db9ec823/typescript-definitions-derive-0.1.10/src/attrs.rs:22:5
   |
22 |     pub ts_as: Option<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 `std::option::Option<syn::ty::Type>`
   = note: required because of the requirements on the impl of `std::fmt::Debug` for `&std::option::Option<syn::ty::Type>`
   = note: required for the cast to the object type `dyn std::fmt::Debug`
phiresky commented 4 years ago

Looks like this is fixed in PR #5

Workaround:

typescript-definitions = { git = "https://github.com/onelson/typescript-definitions", branch = "no-debug-attrs"}