fork/rust

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

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

master
831 B22 linesraw
1error[E0599]: the method `clone` exists for struct `Struct<A>`, but its trait bounds were not satisfied
2  --> $DIR/issue-69725.rs:9:32
3   |
4LL |     let _ = Struct::<A>::new().clone();
5   |                                ^^^^^ method cannot be called on `Struct<A>` due to unsatisfied trait bounds
6   |
7  ::: $DIR/auxiliary/issue-69725.rs:2:1
8   |
9LL | pub struct Struct<A>(A);
10   | -------------------- doesn't satisfy `Struct<A>: Clone`
11   |
12   = note: the following trait bounds were not satisfied:
13           `A: Clone`
14           which is required by `Struct<A>: Clone`
15help: consider restricting the type parameter to satisfy the trait bound
16   |
17LL | fn crash<A>() where A: Clone {
18   |               ++++++++++++++
19
20error: aborting due to previous error
21
22For more information about this error, try `rustc --explain E0599`.