Skip to content
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

Data trait not implemented for u128 #1213

Closed
koutoftimer opened this issue Sep 11, 2020 · 0 comments · Fixed by #1214
Closed

Data trait not implemented for u128 #1213

koutoftimer opened this issue Sep 11, 2020 · 0 comments · Fixed by #1214

Comments

@koutoftimer
Copy link
Contributor

#[derive(Clone, Data, Default, Lens)]
struct State {
    count: u128,
}

gives compilation error

   Compiling druit-test v0.1.0 (E:\Projects\rust\druit-test)
error[E0277]: the trait bound `u128: druid::Data` is not satisfied
  --> src\main.rs:10:17
   |
10 | #[derive(Clone, Data, Default, Lens)]
   |                 ^^^^ the trait `druid::Data` is not implemented for `u128`
   |
   = note: required by `druid::Data::same`
   = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
error: could not compile `druit-test`.

To learn more, run the command again with --verbose.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant