]> git.lizzy.rs Git - rust.git/blob - src/test/ui/derives/derive-assoc-type-not-impl.stderr
Store idents for `DefPathData` into crate metadata
[rust.git] / src / test / ui / derives / derive-assoc-type-not-impl.stderr
1 error[E0599]: no method named `clone` found for struct `Bar<NotClone>` in the current scope
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
8    | doesn't satisfy `Bar<NotClone>: std::clone::Clone`
9 ...
10 LL | struct NotClone;
11    | ---------------- doesn't satisfy `NotClone: std::clone::Clone`
12 ...
13 LL |     Bar::<NotClone> { x: 1 }.clone();
14    |                              ^^^^^ method not found in `Bar<NotClone>`
15    | 
16   ::: $SRC_DIR/libcore/clone.rs:LL:COL
17    |
18 LL |     fn clone(&self) -> Self;
19    |        -----
20    |        |
21    |        the method is available for `std::sync::Arc<Bar<NotClone>>` here
22    |        the method is available for `std::rc::Rc<Bar<NotClone>>` here
23    |
24    = note: the method `clone` exists but the following trait bounds were not satisfied:
25            `NotClone: std::clone::Clone`
26            which is required by `Bar<NotClone>: std::clone::Clone`
27    = help: items from traits can only be used if the trait is implemented and in scope
28    = note: the following trait defines an item `clone`, perhaps you need to implement it:
29            candidate #1: `std::clone::Clone`
30
31 error: aborting due to previous error
32
33 For more information about this error, try `rustc --explain E0599`.