]> git.lizzy.rs Git - rust.git/blob - tests/ui/unique-object-noncopyable.stderr
Rollup merge of #107769 - compiler-errors:pointer-like, r=eholk
[rust.git] / tests / ui / unique-object-noncopyable.stderr
1 error[E0599]: the method `clone` exists for struct `Box<dyn Foo>`, but its trait bounds were not satisfied
2   --> $DIR/unique-object-noncopyable.rs:24:16
3    |
4 LL |   trait Foo {
5    |   ---------
6    |   |
7    |   doesn't satisfy `dyn Foo: Clone`
8    |   doesn't satisfy `dyn Foo: Sized`
9 ...
10 LL |       let _z = y.clone();
11    |                  ^^^^^ method cannot be called on `Box<dyn Foo>` due to unsatisfied trait bounds
12   --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
13   ::: $SRC_DIR/alloc/src/boxed.rs:LL:COL
14    |
15    = note: doesn't satisfy `Box<dyn Foo>: Clone`
16    |
17    = note: the following trait bounds were not satisfied:
18            `dyn Foo: Sized`
19            which is required by `Box<dyn Foo>: Clone`
20            `dyn Foo: Clone`
21            which is required by `Box<dyn Foo>: Clone`
22
23 error: aborting due to previous error
24
25 For more information about this error, try `rustc --explain E0599`.