rust/src/test/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr

12 lines
414 B
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0503]: cannot use `x` because it was mutably borrowed
--> $DIR/unboxed-closures-borrow-conflict.rs:19:9
2018-08-08 07:28:26 -05:00
|
LL | let f = || x += 1;
| -- borrow of `x` occurs here
LL | let _y = x; //~ ERROR cannot use `x` because it was mutably borrowed
| ^^ use of borrowed `x`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0503`.