]>
Commit | Line | Data |
---|---|---|
136023e0 XL |
1 | error[E0596]: cannot borrow `*z.0.0` as mutable, as it is behind a `&` reference |
2 | --> $DIR/cant-mutate-imm-borrow.rs:13:17 | |
5869c6ff XL |
3 | | |
4 | LL | let mut c = || { | |
5 | | ^^ cannot borrow as mutable | |
6 | LL | | |
7 | LL | z.0.0.0 = format!("X1"); | |
136023e0 | 8 | | ------- mutable borrow occurs due to use of `*z.0.0` in closure |
5869c6ff | 9 | |
136023e0 | 10 | error: aborting due to previous error |
5869c6ff XL |
11 | |
12 | For more information about this error, try `rustc --explain E0596`. |