2018-08-08 07:28:26 -05:00
|
|
|
error[E0503]: cannot use `x` because it was mutably borrowed
|
2018-08-08 11:01:04 -05:00
|
|
|
--> $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`.
|