fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1error[E0599]: no method named `clone` found for struct `std::boxed::Box<dyn Foo>` in the current scope 2 --> $DIR/unique-object-noncopyable.rs:24:16 3 | 4LL | trait Foo { 5 | --------- 6 | | 7 | doesn't satisfy `dyn Foo: std::clone::Clone` 8 | doesn't satisfy `dyn Foo: std::marker::Sized` 9... 10LL | let _z = y.clone(); 11 | ^^^^^ method not found in `std::boxed::Box<dyn Foo>` 12 | 13 ::: $SRC_DIR/liballoc/boxed.rs:LL:COL 14 | 15LL | pub struct Box<T: ?Sized>(Unique<T>); 16 | ------------------------------------- doesn't satisfy `std::boxed::Box<dyn Foo>: std::clone::Clone` 17 | 18 ::: $SRC_DIR/libcore/clone.rs:LL:COL 19 | 20LL | fn clone(&self) -> Self; 21 | ----- 22 | | 23 | the method is available for `std::sync::Arc<std::boxed::Box<dyn Foo>>` here 24 | the method is available for `std::rc::Rc<std::boxed::Box<dyn Foo>>` here 25 | 26 = note: the method `clone` exists but the following trait bounds were not satisfied: 27 `dyn Foo: std::marker::Sized` 28 which is required by `std::boxed::Box<dyn Foo>: std::clone::Clone` 29 `dyn Foo: std::clone::Clone` 30 which is required by `std::boxed::Box<dyn Foo>: std::clone::Clone` 31 32error: aborting due to previous error 33 34For more information about this error, try `rustc --explain E0599`.