2017-10-06 16:30:23 -04:00
|
|
|
error[E0594]: cannot assign to immutable borrowed content `*n`
|
|
|
|
--> $DIR/explicit-mut.rs:19:13
|
|
|
|
|
|
|
|
|
18 | Some(n) => {
|
|
|
|
| - consider changing this to `n`
|
2017-11-20 13:13:27 +01:00
|
|
|
19 | *n += 1; //~ ERROR cannot assign to immutable
|
2017-10-06 16:30:23 -04:00
|
|
|
| ^^^^^^^ 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`
|
2017-11-20 13:13:27 +01:00
|
|
|
27 | *n += 1; //~ ERROR cannot assign to immutable
|
2017-10-06 16:30:23 -04:00
|
|
|
| ^^^^^^^ 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`
|
2017-11-20 13:13:27 +01:00
|
|
|
35 | *n += 1; //~ ERROR cannot assign to immutable
|
2017-10-06 16:30:23 -04:00
|
|
|
| ^^^^^^^ cannot borrow as mutable
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|
2018-02-19 21:40:25 +01:00
|
|
|
If you want more information on this error, try using "rustc --explain E0594"
|