blob: c1c59fe678525f8ca35d434110057286a3a1ecfe (
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
|
error[E0594]: cannot assign to immutable borrowed content `*n`
--> $DIR/explicit-mut.rs:19:13
|
18 | Some(n) => {
| - consider changing this to `n`
19 | *n += 1; //~ ERROR cannot assign to immutable
| ^^^^^^^ cannot borrow as mutable
error[E0594]: cannot assign to immutable borrowed content `*n`
--> $DIR/explicit-mut.rs:27:13
|
26 | Some(n) => {
| - consider changing this to `n`
27 | *n += 1; //~ ERROR cannot assign to immutable
| ^^^^^^^ cannot borrow as mutable
error[E0594]: cannot assign to immutable borrowed content `*n`
--> $DIR/explicit-mut.rs:35:13
|
34 | Some(n) => {
| - consider changing this to `n`
35 | *n += 1; //~ ERROR cannot assign to immutable
| ^^^^^^^ cannot borrow as mutable
error: aborting due to 3 previous errors
|