]> git.proxmox.com Git - rustc.git/blame - src/test/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr
New upstream version 1.46.0~beta.2+dfsg1
[rustc.git] / src / test / ui / pattern / bindings-after-at / bind-by-move-neither-can-live-while-the-other-survives-1.stderr
CommitLineData
74b04a01
XL
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
dfeec247 3 |
74b04a01
XL
4LL | Some(ref _y @ _z) => {}
5 | ------^^^--
dfeec247 6 | | |
74b04a01
XL
7 | | value moved into `_z` here
8 | value borrowed, by `_y`, here
dfeec247 9
74b04a01
XL
10error: borrow of moved value
11 --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:21:14
dfeec247 12 |
74b04a01
XL
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
dfeec247 19
74b04a01
XL
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
dfeec247 22 |
74b04a01
XL
23LL | Some(ref mut _y @ _z) => {}
24 | ----------^^^--
dfeec247 25 | | |
74b04a01
XL
26 | | value moved into `_z` here
27 | value borrowed, by `_y`, here
dfeec247 28
74b04a01
XL
29error: borrow of moved value
30 --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:35:14
dfeec247 31 |
74b04a01
XL
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
dfeec247
XL
38
39error[E0382]: borrow of moved value
74b04a01 40 --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:21:19
dfeec247 41 |
74b04a01 42LL | Some(_z @ ref _y) => {}
dfeec247
XL
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
f035d41b
XL
49help: borrow this field in the pattern to avoid moving `x.0`
50 |
51LL | Some(ref _z @ ref _y) => {}
52 | ^^^
dfeec247
XL
53
54error[E0382]: borrow of moved value
74b04a01 55 --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:35:19
dfeec247 56 |
74b04a01 57LL | Some(_z @ ref mut _y) => {}
dfeec247
XL
58 | -----^^^^^^^^^^
59 | | |
60 | | value borrowed here after move
61 | value moved here
62 |
63 = note: move occurs because value has type `X`, which does not implement the `Copy` trait
f035d41b
XL
64help: borrow this field in the pattern to avoid moving `x.0`
65 |
66LL | Some(ref _z @ ref mut _y) => {}
67 | ^^^
dfeec247
XL
68
69error: aborting due to 6 previous errors
70
74b04a01 71For more information about this error, try `rustc --explain E0382`.