]> git.lizzy.rs Git - rust.git/blob - src/test/ui/missing-trait-bounds/issue-69725.stderr
Rollup merge of #99516 - m-ou-se:proc-macro-tracked-tracking-issue, r=Mark-Simulacrum
[rust.git] / src / test / ui / missing-trait-bounds / issue-69725.stderr
1 error[E0599]: the method `clone` exists for struct `Struct<A>`, but its trait bounds were not satisfied
2   --> $DIR/issue-69725.rs:9:32
3    |
4 LL |     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    |
9 LL | 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`
15 help: consider restricting the type parameter to satisfy the trait bound
16    |
17 LL | fn crash<A>() where A: Clone {
18    |               ++++++++++++++
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0599`.