2018-09-13 16:04:00 -05:00
|
|
|
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); })();
|
2021-03-17 01:51:27 -05:00
|
|
|
| ^^ -- borrow occurs due to use of `x` in closure
|
2018-09-13 16:04:00 -05:00
|
|
|
| |
|
|
|
|
| cannot mutably borrow
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0510`.
|