|
1 | | -error[E0423]: expected value, found type alias `NotCopy` |
2 | | - --> $DIR/moves.rs:14:20 |
3 | | - | |
4 | | -LL | let base = NotCopy; |
5 | | - | ^^^^^^^ |
6 | | - | |
7 | | - = note: can't use a type alias as a constructor |
8 | | - |
9 | | -error[E0423]: expected value, found type alias `NotCopy` |
10 | | - --> $DIR/moves.rs:23:53 |
11 | | - | |
12 | | -LL | let binder: unsafe<> NotCopy = wrap_binder!(NotCopy); |
13 | | - | ^^^^^^^ |
14 | | - | |
15 | | - = note: can't use a type alias as a constructor |
16 | | - |
17 | | -error[E0423]: expected value, found type alias `NotCopy` |
18 | | - --> $DIR/moves.rs:32:65 |
19 | | - | |
20 | | -LL | let binder: unsafe<> (NotCopy, NotCopy) = wrap_binder!((NotCopy, NotCopy)); |
21 | | - | ^^^^^^^ |
22 | | - | |
23 | | - = note: can't use a type alias as a constructor |
24 | | - |
25 | | -error[E0423]: expected value, found type alias `NotCopy` |
26 | | - --> $DIR/moves.rs:32:74 |
27 | | - | |
28 | | -LL | let binder: unsafe<> (NotCopy, NotCopy) = wrap_binder!((NotCopy, NotCopy)); |
29 | | - | ^^^^^^^ |
30 | | - | |
31 | | - = note: can't use a type alias as a constructor |
32 | | - |
33 | 1 | warning: the feature `unsafe_binders` is incomplete and may not be safe to use and/or cause compiler crashes |
34 | | - --> $DIR/moves.rs:3:12 |
| 2 | + --> $DIR/moves.rs:1:12 |
35 | 3 | | |
36 | 4 | LL | #![feature(unsafe_binders)] |
37 | 5 | | ^^^^^^^^^^^^^^ |
38 | 6 | | |
39 | 7 | = note: see issue #130516 <https://github.com/rust-lang/rust/issues/130516> for more information |
40 | 8 | = note: `#[warn(incomplete_features)]` on by default |
41 | 9 |
|
42 | | -error[E0277]: the trait bound `NotCopyInner: Copy` is not satisfied |
43 | | - --> $DIR/moves.rs:15:21 |
| 10 | +error[E0382]: use of moved value: `base` |
| 11 | + --> $DIR/moves.rs:15:14 |
44 | 12 | | |
| 13 | +LL | let base = NotCopy::default(); |
| 14 | + | ---- move occurs because `base` has type `ManuallyDrop<NotCopyInner>`, which does not implement the `Copy` trait |
45 | 15 | LL | let binder: unsafe<> NotCopy = wrap_binder!(base); |
46 | | - | ^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopyInner` |
47 | | - | |
48 | | - = note: required for `ManuallyDrop<NotCopyInner>` to implement `Copy` |
49 | | -help: consider annotating `NotCopyInner` with `#[derive(Copy)]` |
50 | | - | |
51 | | -LL + #[derive(Copy)] |
52 | | -LL | struct NotCopyInner; |
53 | | - | |
| 16 | + | ---- value moved here |
| 17 | +LL | drop(base); |
| 18 | + | ^^^^ value used here after move |
54 | 19 |
|
55 | | -error[E0277]: the trait bound `NotCopyInner: Copy` is not satisfied |
56 | | - --> $DIR/moves.rs:23:21 |
| 20 | +error[E0382]: use of moved value: `binder` |
| 21 | + --> $DIR/moves.rs:24:14 |
57 | 22 | | |
58 | | -LL | let binder: unsafe<> NotCopy = wrap_binder!(NotCopy); |
59 | | - | ^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopyInner` |
60 | | - | |
61 | | - = note: required for `ManuallyDrop<NotCopyInner>` to implement `Copy` |
62 | | -help: consider annotating `NotCopyInner` with `#[derive(Copy)]` |
63 | | - | |
64 | | -LL + #[derive(Copy)] |
65 | | -LL | struct NotCopyInner; |
| 23 | +LL | drop(unwrap_binder!(binder)); |
| 24 | + | ---------------------- value moved here |
| 25 | +LL | drop(unwrap_binder!(binder)); |
| 26 | + | ^^^^^^^^^^^^^^^^^^^^^^ value used here after move |
66 | 27 | | |
| 28 | + = note: move occurs because `binder` has type `ManuallyDrop<NotCopyInner>`, which does not implement the `Copy` trait |
| 29 | + = note: this error originates in the macro `unwrap_binder` (in Nightly builds, run with -Z macro-backtrace for more info) |
67 | 30 |
|
68 | | -error[E0277]: the trait bound `NotCopyInner: Copy` is not satisfied |
69 | | - --> $DIR/moves.rs:32:21 |
70 | | - | |
71 | | -LL | let binder: unsafe<> (NotCopy, NotCopy) = wrap_binder!((NotCopy, NotCopy)); |
72 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopyInner` |
73 | | - | |
74 | | - = note: required for `ManuallyDrop<NotCopyInner>` to implement `Copy` |
75 | | - = note: required because it appears within the type `(ManuallyDrop<NotCopyInner>, ManuallyDrop<NotCopyInner>)` |
76 | | -help: consider annotating `NotCopyInner` with `#[derive(Copy)]` |
| 31 | +error[E0382]: use of moved value: `binder.0` |
| 32 | + --> $DIR/moves.rs:36:14 |
77 | 33 | | |
78 | | -LL + #[derive(Copy)] |
79 | | -LL | struct NotCopyInner; |
| 34 | +LL | drop(unwrap_binder!(binder).0); |
| 35 | + | ------------------------ value moved here |
| 36 | +... |
| 37 | +LL | drop(unwrap_binder!(binder).0); |
| 38 | + | ^^^^^^^^^^^^^^^^^^^^^^^^ value used here after move |
80 | 39 | | |
| 40 | + = note: move occurs because `binder.0` has type `ManuallyDrop<NotCopyInner>`, which does not implement the `Copy` trait |
81 | 41 |
|
82 | | -error: aborting due to 7 previous errors; 1 warning emitted |
| 42 | +error: aborting due to 3 previous errors; 1 warning emitted |
83 | 43 |
|
84 | | -Some errors have detailed explanations: E0277, E0423. |
85 | | -For more information about an error, try `rustc --explain E0277`. |
| 44 | +For more information about this error, try `rustc --explain E0382`. |
0 commit comments