summary refs log tree commit diff
path: root/src/test/ui/unique-object-noncopyable.stderr
blob: 161e25bb8c5f138aeeac5d043023bf1c0a845dbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
error[E0599]: no method named `clone` found for struct `std::boxed::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`
...
LL |     let _z = y.clone();
   |                ^^^^^ method not found in `std::boxed::Box<dyn Foo>`
   | 
  ::: $SRC_DIR/liballoc/boxed.rs:LL:COL
   |
LL | pub struct Box<T: ?Sized>(Unique<T>);
   | ------------------------------------- doesn't satisfy `std::boxed::Box<dyn Foo>: std::clone::Clone`
   | 
  ::: $SRC_DIR/libcore/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
   |
   = 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`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.