fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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