]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm-borrow.stderr
Rollup merge of #107313 - calebcartwright:style-guide-triagebot, r=joshtriplett
[rust.git] / tests / ui / closures / 2229_closure_analysis / diagnostics / cant-mutate-imm-borrow.stderr
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
3    |
4 LL |     let mut c = || {
5    |                 ^^ cannot borrow as mutable
6 LL |
7 LL |         z.0.0.0 = format!("X1");
8    |         ------- mutable borrow occurs due to use of `*z.0.0` in closure
9
10 error: aborting due to previous error
11
12 For more information about this error, try `rustc --explain E0596`.