2022-03-29 17:17:27 +00:00
|
|
|
error[E0277]: the trait bound `T: Clone` is not satisfied
|
2023-11-10 02:11:24 +00:00
|
|
|
--> $DIR/derive-clone-for-eq.rs:4:17
|
2022-03-29 17:17:27 +00:00
|
|
|
|
|
|
|
|
LL | #[derive(Clone, Eq)]
|
|
|
|
| ^^ the trait `Clone` is not implemented for `T`
|
|
|
|
|
|
2022-08-15 20:31:37 +00:00
|
|
|
note: required for `Struct<T>` to implement `PartialEq`
|
2023-11-10 02:11:24 +00:00
|
|
|
--> $DIR/derive-clone-for-eq.rs:7:19
|
2022-03-29 17:17:27 +00:00
|
|
|
|
|
|
|
|
LL | impl<T: Clone, U> PartialEq<U> for Struct<T>
|
2023-01-11 03:21:11 +00:00
|
|
|
| ----- ^^^^^^^^^^^^ ^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| unsatisfied trait bound introduced here
|
2022-03-29 17:17:27 +00:00
|
|
|
note: required by a bound in `Eq`
|
|
|
|
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
|
|
|
= note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
help: consider restricting type parameter `T`
|
|
|
|
|
|
|
|
|
LL | pub struct Struct<T: std::clone::Clone>(T);
|
|
|
|
| +++++++++++++++++++
|
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2022-03-29 17:17:27 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|