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