fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
915 B24 linesraw
1error[E0277]: the trait bound `T: Clone` is not satisfied
2  --> $DIR/derive-clone-for-eq.rs:6:17
3   |
4LL | #[derive(Clone, Eq)]
5   |                 ^^ the trait `Clone` is not implemented for `T`
6   |
7note: required for `Struct<T>` to implement `PartialEq`
8  --> $DIR/derive-clone-for-eq.rs:9:19
9   |
10LL | impl<T: Clone, U> PartialEq<U> for Struct<T>
11   |         -----     ^^^^^^^^^^^^     ^^^^^^^^^
12   |         |
13   |         unsatisfied trait bound introduced here
14note: required by a bound in `Eq`
15  --> $SRC_DIR/core/src/cmp.rs:LL:COL
16   = note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
17help: consider restricting type parameter `T`
18   |
19LL | pub struct Struct<T: std::clone::Clone>(T);
20   |                    +++++++++++++++++++
21
22error: aborting due to previous error
23
24For more information about this error, try `rustc --explain E0277`.