os-rust/tests/ui/nll/issue-27282-mutate-before-diverging-arm-1.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
496 B
Text
Raw Normal View History

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