summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/issue-27282-mutate-before-diverging-arm-3.stderr
blob: e4d0cf31112723080c67bc9257bcbb73bc83d80c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
error[E0510]: cannot mutably borrow `x` in match guard
  --> $DIR/issue-27282-mutate-before-diverging-arm-3.rs:20:14
   |
LL |     match **x {
   |           --- value is immutable in match guard
...
LL |             (|| { *x = &None; drop(force_fn_once); })();
   |              ^^   -- borrow occurs due to use of `x` in closure
   |              |
   |              cannot mutably borrow

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0510`.