linebender / druid

A data-first Rust-native UI design toolkit.
https://linebender.org/druid/
Apache License 2.0
9.52k stars 568 forks source link

Issue building druid-derive on macos #2374

Closed AtomicGamer9523 closed 1 year ago

AtomicGamer9523 commented 1 year ago

I encountered an error when building druid-derive on macos:

   Compiling druid-derive v0.5.0
error[E0277]: `syn::Type` doesn't implement `Debug`
  --> /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/druid-derive-0.5.0/src/attr.rs:66:5
   |
63 | #[derive(Debug)]
   |          ----- in this derive macro expansion
...
66 |     pub ty: syn::Type,
   |     ^^^^^^^^^^^^^^^^^ `syn::Type` cannot be formatted using `{:?}` because it doesn't implement `Debug`
   |
   = help: the trait `Debug` is not implemented for `syn::Type`
   = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: `ExprPath` doesn't implement `Debug`
  --> /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/druid-derive-0.5.0/src/attr.rs:75:12
   |
71 | #[derive(Debug, PartialEq, Eq)]
   |          ----- in this derive macro expansion
...
75 |     SameFn(ExprPath),
   |            ^^^^^^^^ `ExprPath` cannot be formatted using `{:?}` because it doesn't implement `Debug`
   |
   = help: the trait `Debug` is not implemented for `ExprPath`
   = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0369]: binary operation `==` cannot be applied to type `ExprPath`
  --> /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/druid-derive-0.5.0/src/attr.rs:75:12
   |
71 | #[derive(Debug, PartialEq, Eq)]
   |                 --------- in this derive macro expansion
...
75 |     SameFn(ExprPath),
   |            ^^^^^^^^
   |
   = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `ExprPath: std::cmp::Eq` is not satisfied
  --> /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/druid-derive-0.5.0/src/attr.rs:75:12
   |
71 | #[derive(Debug, PartialEq, Eq)]
   |                            -- in this derive macro expansion
...
75 |     SameFn(ExprPath),
   |            ^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `ExprPath`
   |
note: required by a bound in `AssertParamIsEq`
  --> /rustc/1a6ae3d692cfb52b21d0f45ba50b659486e53d6c/library/core/src/cmp.rs:313:1
   = note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)

Some errors have detailed explanations: E0277, E0369.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `druid-derive` (lib) due to 4 previous errors
AtomicGamer9523 commented 1 year ago

Submitted #2375, waiting for approval