]> git.proxmox.com Git - rustc.git/blob - src/test/ui/unique-object-noncopyable.stderr
New upstream version 1.50.0+dfsg1
[rustc.git] / src / test / ui / unique-object-noncopyable.stderr
1 error[E0599]: no method named `clone` found for struct `Box<dyn Foo>` in the current scope
2 --> $DIR/unique-object-noncopyable.rs:24:16
3 |
4 LL | trait Foo {
5 | ---------
6 | |
7 | doesn't satisfy `dyn Foo: Clone`
8 | doesn't satisfy `dyn Foo: Sized`
9 ...
10 LL | let _z = y.clone();
11 | ^^^^^ method not found in `Box<dyn Foo>`
12 |
13 ::: $SRC_DIR/core/src/clone.rs:LL:COL
14 |
15 LL | fn clone(&self) -> Self;
16 | -----
17 | |
18 | the method is available for `Arc<Box<dyn Foo>>` here
19 | the method is available for `Rc<Box<dyn Foo>>` here
20 |
21 ::: $SRC_DIR/alloc/src/boxed.rs:LL:COL
22 |
23 LL | / pub struct Box<
24 LL | | T: ?Sized,
25 LL | | #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
26 LL | | >(Unique<T>, A);
27 | |________________- doesn't satisfy `Box<dyn Foo>: Clone`
28 |
29 = note: the method `clone` exists but the following trait bounds were not satisfied:
30 `dyn Foo: Sized`
31 which is required by `Box<dyn Foo>: Clone`
32 `dyn Foo: Clone`
33 which is required by `Box<dyn Foo>: Clone`
34
35 error: aborting due to previous error
36
37 For more information about this error, try `rustc --explain E0599`.