]> git.lizzy.rs Git - rust.git/blob - tests/ui/derives/derive-assoc-type-not-impl.stderr
Rollup merge of #106323 - starkat99:stabilize-f16c_target_feature, r=petrochenkov
[rust.git] / tests / ui / derives / derive-assoc-type-not-impl.stderr
1 error[E0599]: the method `clone` exists for struct `Bar<NotClone>`, but its trait bounds were not satisfied
2   --> $DIR/derive-assoc-type-not-impl.rs:18:30
3    |
4 LL | struct Bar<T: Foo> {
5    | ------------------
6    | |
7    | method `clone` not found for this struct
8    | doesn't satisfy `Bar<NotClone>: Clone`
9 ...
10 LL | struct NotClone;
11    | --------------- doesn't satisfy `NotClone: Clone`
12 ...
13 LL |     Bar::<NotClone> { x: 1 }.clone();
14    |                              ^^^^^ method cannot be called on `Bar<NotClone>` due to unsatisfied trait bounds
15    |
16 note: trait bound `NotClone: Clone` was not satisfied
17   --> $DIR/derive-assoc-type-not-impl.rs:6:10
18    |
19 LL | #[derive(Clone)]
20    |          ^^^^^ unsatisfied trait bound introduced in this `derive` macro
21    = note: the following trait bounds were not satisfied:
22            `NotClone: Clone`
23            which is required by `Bar<NotClone>: Clone`
24    = help: items from traits can only be used if the trait is implemented and in scope
25    = note: the following trait defines an item `clone`, perhaps you need to implement it:
26            candidate #1: `Clone`
27 help: consider annotating `NotClone` with `#[derive(Clone)]`
28    |
29 LL | #[derive(Clone)]
30    |
31
32 error: aborting due to previous error
33
34 For more information about this error, try `rustc --explain E0599`.