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
7 | doesn't satisfy `dyn Foo: Clone`
8 | doesn't satisfy `dyn Foo: Sized`
10 LL | let _z = y.clone();
11 | ^^^^^ method cannot be called on `Box<dyn Foo>` due to unsatisfied trait bounds
13 ::: $SRC_DIR/core/src/clone.rs:LL:COL
15 LL | fn clone(&self) -> Self;
18 | the method is available for `Arc<Box<dyn Foo>>` here
19 | the method is available for `Rc<Box<dyn Foo>>` here
21 ::: $SRC_DIR/alloc/src/boxed.rs:LL:COL
23 LL | / pub struct Box<
25 LL | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
26 LL | | >(Unique<T>, A);
27 | |________________- doesn't satisfy `Box<dyn Foo>: Clone`
29 = note: the following trait bounds were not satisfied:
31 which is required by `Box<dyn Foo>: Clone`
33 which is required by `Box<dyn Foo>: Clone`
35 error: aborting due to previous error
37 For more information about this error, try `rustc --explain E0599`.