blob: 582d0fd678c07f56eb4d6f1d3a2caeec2de7ac20 [file] [log] [blame]
error[E0500]: closure requires unique access to `x` but it is already borrowed
--> $DIR/issue-27282-mutate-before-diverging-arm-2.rs:38:18
|
LL | match x {
| - borrow occurs here
...
LL | (|| { *x = None; drop(force_fn_once); })();
| ^^ - second borrow occurs due to use of `x` in closure
| |
| closure construction occurs here
...
LL | &mut Some(&2)
| ------------- borrow later used here
error: aborting due to previous error
For more information about this error, try `rustc --explain E0500`.