]> git.lizzy.rs Git - rust.git/blob - tests/ui/pattern/bindings-after-at/bind-by-move-neither-can-live-while-the-other-survives-1.stderr
Update snap from `1.0.1` to `1.1.0`
[rust.git] / tests / ui / pattern / bindings-after-at / bind-by-move-neither-can-live-while-the-other-survives-1.stderr
1 error: cannot move out of value because it is borrowed
2   --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:12:14
3    |
4 LL |         Some(ref _y @ _z) => {}
5    |              ------^^^--
6    |              |        |
7    |              |        value moved into `_z` here
8    |              value borrowed, by `_y`, here
9
10 error: borrow of moved value
11   --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:19:14
12    |
13 LL |         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    |
20 help: borrow this binding in the pattern to avoid moving the value
21    |
22 LL |         Some(ref _z @ ref _y) => {}
23    |              +++
24
25 error: cannot move out of value because it is borrowed
26   --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:26:14
27    |
28 LL |         Some(ref mut _y @ _z) => {}
29    |              ----------^^^--
30    |              |            |
31    |              |            value moved into `_z` here
32    |              value borrowed, by `_y`, here
33
34 error: borrow of moved value
35   --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:33:14
36    |
37 LL |         Some(_z @ ref mut _y) => {}
38    |              --^^^----------
39    |              |    |
40    |              |    value borrowed here after move
41    |              value moved into `_z` here
42    |              move occurs because `_z` has type `X` which does not implement the `Copy` trait
43    |
44 help: borrow this binding in the pattern to avoid moving the value
45    |
46 LL |         Some(ref _z @ ref mut _y) => {}
47    |              +++
48
49 error[E0382]: borrow of moved value
50   --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:12:14
51    |
52 LL |         Some(ref _y @ _z) => {}
53    |              ^^^^^^   -- value moved here
54    |              |
55    |              value borrowed here after move
56    |
57    = note: move occurs because value has type `X`, which does not implement the `Copy` trait
58 help: borrow this binding in the pattern to avoid moving the value
59    |
60 LL |         Some(ref _y @ ref _z) => {}
61    |                       +++
62
63 error[E0382]: borrow of moved value
64   --> $DIR/bind-by-move-neither-can-live-while-the-other-survives-1.rs:26:14
65    |
66 LL |         Some(ref mut _y @ _z) => {}
67    |              ^^^^^^^^^^   -- value moved here
68    |              |
69    |              value borrowed here after move
70    |
71    = note: move occurs because value has type `X`, which does not implement the `Copy` trait
72 help: borrow this binding in the pattern to avoid moving the value
73    |
74 LL |         Some(ref mut _y @ ref _z) => {}
75    |                           +++
76
77 error: aborting due to 6 previous errors
78
79 For more information about this error, try `rustc --explain E0382`.