2021-06-27 20:19:39 -05:00
|
|
|
error[E0596]: cannot borrow `*z.0.0` as mutable, as it is behind a `&` reference
|
2021-06-27 01:22:46 -05:00
|
|
|
--> $DIR/cant-mutate-imm-borrow.rs:13:17
|
2020-12-13 00:29:20 -06:00
|
|
|
|
|
|
|
|
LL | let mut c = || {
|
|
|
|
| ^^ cannot borrow as mutable
|
|
|
|
LL |
|
|
|
|
LL | z.0.0.0 = format!("X1");
|
2021-06-27 20:19:39 -05:00
|
|
|
| ------- mutable borrow occurs due to use of `*z.0.0` in closure
|
2020-12-13 00:29:20 -06:00
|
|
|
|
2021-06-27 01:22:46 -05:00
|
|
|
error: aborting due to previous error
|
2020-12-13 00:29:20 -06:00
|
|
|
|
2020-12-12 23:11:15 -06:00
|
|
|
For more information about this error, try `rustc --explain E0596`.
|