rust/src/test/ui/issues/issue-27282-mutate-before-diverging-arm-2.stderr

15 lines
510 B
Plaintext
Raw Normal View History

2018-09-13 21:04:09 +00:00
error[E0510]: cannot mutably borrow `x` in match guard
2018-12-25 15:56:47 +00:00
--> $DIR/issue-27282-mutate-before-diverging-arm-2.rs:28:18
|
LL | match x {
2018-09-13 21:04:09 +00:00
| - value is immutable in match guard
...
LL | (|| { *x = None; drop(force_fn_once); })();
2018-09-13 21:04:09 +00:00
| ^^ - borrow occurs due to use of `x` in closure
| |
2018-09-13 21:04:09 +00:00
| cannot mutably borrow
error: aborting due to previous error
2018-09-13 21:04:09 +00:00
For more information about this error, try `rustc --explain E0510`.