mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +00:00
41e8d152dc
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
15 lines
512 B
Plaintext
15 lines
512 B
Plaintext
error[E0510]: cannot mutably borrow `x` in match guard
|
|
--> $DIR/issue-27282-mutate-before-diverging-arm-2.rs:26:18
|
|
|
|
|
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`.
|