-error[E0599]: no method named `clone` found for struct `std::boxed::Box<dyn Foo>` in the current scope
+error[E0599]: no method named `clone` found for struct `Box<dyn Foo>` in the current scope
--> $DIR/unique-object-noncopyable.rs:24:16
|
LL | trait Foo {
| ---------
| |
- | doesn't satisfy `dyn Foo: std::clone::Clone`
- | doesn't satisfy `dyn Foo: std::marker::Sized`
+ | doesn't satisfy `dyn Foo: Clone`
+ | doesn't satisfy `dyn Foo: Sized`
...
LL | let _z = y.clone();
- | ^^^^^ method not found in `std::boxed::Box<dyn Foo>`
+ | ^^^^^ method not found in `Box<dyn Foo>`
|
::: $SRC_DIR/alloc/src/boxed.rs:LL:COL
|
LL | pub struct Box<T: ?Sized>(Unique<T>);
- | ------------------------------------- doesn't satisfy `std::boxed::Box<dyn Foo>: std::clone::Clone`
+ | ------------------------------------- doesn't satisfy `Box<dyn Foo>: Clone`
|
::: $SRC_DIR/core/src/clone.rs:LL:COL
|
LL | fn clone(&self) -> Self;
| -----
| |
- | the method is available for `std::sync::Arc<std::boxed::Box<dyn Foo>>` here
- | the method is available for `std::rc::Rc<std::boxed::Box<dyn Foo>>` here
+ | the method is available for `Arc<Box<dyn Foo>>` here
+ | the method is available for `Rc<Box<dyn Foo>>` here
|
= note: the method `clone` exists but the following trait bounds were not satisfied:
- `dyn Foo: std::marker::Sized`
- which is required by `std::boxed::Box<dyn Foo>: std::clone::Clone`
- `dyn Foo: std::clone::Clone`
- which is required by `std::boxed::Box<dyn Foo>: std::clone::Clone`
+ `dyn Foo: Sized`
+ which is required by `Box<dyn Foo>: Clone`
+ `dyn Foo: Clone`
+ which is required by `Box<dyn Foo>: Clone`
error: aborting due to previous error