]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-27282-mutate-before-diverging-arm-1.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / issues / issue-27282-mutate-before-diverging-arm-1.stderr
1 error[E0510]: cannot mutably borrow `x` in match guard
2   --> $DIR/issue-27282-mutate-before-diverging-arm-1.rs:33:14
3    |
4 LL |     match x {
5    |           - value is immutable in match guard
6 ...
7 LL |             (|| { *x = None; drop(force_fn_once); })();
8    |              ^^    - borrow occurs due to use of `x` in closure
9    |              |
10    |              cannot mutably borrow
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0510`.