blob: 0445a75d61a9daccd504a45e061d9b685cd022e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
error[E0507]: cannot move out of borrowed content
--> $DIR/borrowck-issue-2657-2.rs:17:18
|
LL | let _b = *y; //~ ERROR cannot move out
| ^^
| |
| cannot move out of borrowed content
| help: consider removing the `*`: `y`
error[E0507]: cannot move out of `*y` which is behind a `&` reference
--> $DIR/borrowck-issue-2657-2.rs:17:18
|
LL | Some(ref y) => {
| ----- help: consider changing this to be a mutable reference: `ref mut y`
LL | let _b = *y; //~ ERROR cannot move out
| ^^
| |
| cannot move out of `*y` which is behind a `&` reference
| `y` is a `&` reference, so the data it refers to cannot be moved
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0507`.
|