fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
2.4 KiB63 linesraw
1error: cannot move out of value because it is borrowed
2  --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:15:14
3   |
4LL |         Some(ref _y @ _z) => {}
5   |              ------^^^--
6   |              |        |
7   |              |        value moved into `_z` here
8   |              value borrowed, by `_y`, here
9
10error: borrow of moved value
11  --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:21:14
12   |
13LL |         Some(_z @ ref _y) => {}
14   |              --^^^------
15   |              |    |
16   |              |    value borrowed here after move
17   |              value moved into `_z` here
18   |              move occurs because `_z` has type `X` which does not implement the `Copy` trait
19
20error: cannot move out of value because it is borrowed
21  --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:29:14
22   |
23LL |         Some(ref mut _y @ _z) => {}
24   |              ----------^^^--
25   |              |            |
26   |              |            value moved into `_z` here
27   |              value borrowed, by `_y`, here
28
29error: borrow of moved value
30  --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:35:14
31   |
32LL |         Some(_z @ ref mut _y) => {}
33   |              --^^^----------
34   |              |    |
35   |              |    value borrowed here after move
36   |              value moved into `_z` here
37   |              move occurs because `_z` has type `X` which does not implement the `Copy` trait
38
39error[E0382]: borrow of moved value
40  --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:21:19
41   |
42LL |         Some(_z @ ref _y) => {}
43   |              -----^^^^^^
44   |              |    |
45   |              |    value borrowed here after move
46   |              value moved here
47   |
48   = note: move occurs because value has type `X`, which does not implement the `Copy` trait
49
50error[E0382]: borrow of moved value
51  --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:35:19
52   |
53LL |         Some(_z @ ref mut _y) => {}
54   |              -----^^^^^^^^^^
55   |              |    |
56   |              |    value borrowed here after move
57   |              value moved here
58   |
59   = note: move occurs because value has type `X`, which does not implement the `Copy` trait
60
61error: aborting due to 6 previous errors
62
63For more information about this error, try `rustc --explain E0382`.