1error[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 | 4LL | trait Foo { 5 | --------- 6 | | 7 | doesn't satisfy `dyn Foo: Clone` 8 | doesn't satisfy `dyn Foo: Sized` 9... 10LL | let _z = y.clone(); 11 | ^^^^^ method cannot be called on `Box<dyn Foo>` due to unsatisfied trait bounds 12 | 13 ::: $SRC_DIR/alloc/src/boxed.rs:LL:COL 14 | 15LL | / pub struct Box< 16LL | | T: ?Sized, 17LL | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global, 18LL | | >(Unique<T>, A); 19 | |________________- doesn't satisfy `Box<dyn Foo>: Clone` 20 | 21 = note: the following trait bounds were not satisfied: 22 `dyn Foo: Sized` 23 which is required by `Box<dyn Foo>: Clone` 24 `dyn Foo: Clone` 25 which is required by `Box<dyn Foo>: Clone` 26 27error: aborting due to previous error 28 29For more information about this error, try `rustc --explain E0599`. 30