2018-09-13 16:04:09 -05:00
|
|
|
error[E0510]: cannot mutably borrow `x` in match guard
|
2019-09-06 09:23:00 -05:00
|
|
|
--> $DIR/issue-27282-mutate-before-diverging-arm-1.rs:21:14
|
2018-05-23 04:21:01 -05:00
|
|
|
|
|
2018-07-22 15:13:18 -05:00
|
|
|
LL | match x {
|
2018-09-13 16:04:09 -05:00
|
|
|
| - value is immutable in match guard
|
2018-07-22 15:13:18 -05:00
|
|
|
...
|
|
|
|
LL | (|| { *x = None; drop(force_fn_once); })();
|
2021-03-17 01:51:27 -05:00
|
|
|
| ^^ -- borrow occurs due to use of `x` in closure
|
2018-07-22 15:13:18 -05:00
|
|
|
| |
|
2018-09-13 16:04:09 -05:00
|
|
|
| cannot mutably borrow
|
2018-05-23 04:21:01 -05:00
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2018-05-23 04:21:01 -05:00
|
|
|
|
2018-09-13 16:04:09 -05:00
|
|
|
For more information about this error, try `rustc --explain E0510`.
|