2022-03-29 12:17:27 -05:00
|
|
|
error[E0277]: the trait bound `T: Clone` is not satisfied
|
|
|
|
--> $DIR/derive-clone-for-eq.rs:6:17
|
|
|
|
|
|
|
|
|
LL | #[derive(Clone, Eq)]
|
|
|
|
| ^^ the trait `Clone` is not implemented for `T`
|
|
|
|
|
|
2022-08-15 15:31:37 -05:00
|
|
|
note: required for `Struct<T>` to implement `PartialEq`
|
2022-03-29 12:17:27 -05:00
|
|
|
--> $DIR/derive-clone-for-eq.rs:9:19
|
|
|
|
|
|
|
|
|
LL | impl<T: Clone, U> PartialEq<U> for Struct<T>
|
2023-01-10 21:21:11 -06:00
|
|
|
| ----- ^^^^^^^^^^^^ ^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| unsatisfied trait bound introduced here
|
2022-03-29 12:17:27 -05: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 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2022-03-29 12:17:27 -05:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|