rust/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm-borrow.stderr
Nilstrieb 41e8d152dc Show number in error message even for one error
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00

13 lines
434 B
Plaintext

error[E0596]: cannot borrow `*z.0.0` as mutable, as it is behind a `&` reference
--> $DIR/cant-mutate-imm-borrow.rs:13:17
|
LL | let mut c = || {
| ^^ cannot borrow as mutable
LL |
LL | z.0.0.0 = format!("X1");
| ------- mutable borrow occurs due to use of `*z.0.0` in closure
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0596`.