summary refs log tree commit diff
path: root/src/test/ui/unique-object-noncopyable.stderr
blob: fb78095224b904751e7606b61cf7fe5557710176 (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
error[E0599]: no method named `clone` found for struct `std::boxed::Box<dyn Foo>` in the current scope
  --> $DIR/unique-object-noncopyable.rs:28: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`
   |
   = 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`.