summaryrefslogtreecommitdiffstats
path: root/tests/ui/closures/2229_closure_analysis/diagnostics/cant-mutate-imm-borrow.stderr
blob: d224f21bc84926baa30acf19bcd31c772b9ac272 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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`.