]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unique-pinned-nocopy.stderr
Detect pub fn attr wrong order like `async pub`
[rust.git] / src / test / ui / unique-pinned-nocopy.stderr
1 error[E0599]: the method `clone` exists for struct `Box<R>`, but its trait bounds were not satisfied
2   --> $DIR/unique-pinned-nocopy.rs:12:16
3    |
4 LL |   struct R {
5    |   -------- doesn't satisfy `R: Clone`
6 ...
7 LL |       let _j = i.clone();
8    |                  ^^^^^ method cannot be called on `Box<R>` due to unsatisfied trait bounds
9    | 
10   ::: $SRC_DIR/core/src/clone.rs:LL:COL
11    |
12 LL |       fn clone(&self) -> Self;
13    |          -----
14    |          |
15    |          the method is available for `Arc<Box<R>>` here
16    |          the method is available for `Rc<Box<R>>` here
17    | 
18   ::: $SRC_DIR/alloc/src/boxed.rs:LL:COL
19    |
20 LL | / pub struct Box<
21 LL | |     T: ?Sized,
22 LL | |     #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
23 LL | | >(Unique<T>, A);
24    | |________________- doesn't satisfy `Box<R>: Clone`
25    |
26    = note: the following trait bounds were not satisfied:
27            `R: Clone`
28            which is required by `Box<R>: Clone`
29    = help: items from traits can only be used if the trait is implemented and in scope
30    = note: the following trait defines an item `clone`, perhaps you need to implement it:
31            candidate #1: `Clone`
32
33 error: aborting due to previous error
34
35 For more information about this error, try `rustc --explain E0599`.