]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / unboxed-closures / unboxed-closures-borrow-conflict.stderr
1 error[E0503]: cannot use `x` because it was mutably borrowed
2   --> $DIR/unboxed-closures-borrow-conflict.rs:19:9
3    |
4 LL |     let f = || x += 1;
5    |             -- borrow of `x` occurs here
6 LL |     let _y = x; //~ ERROR cannot use `x` because it was mutably borrowed
7    |         ^^ use of borrowed `x`
8
9 error: aborting due to previous error
10
11 For more information about this error, try `rustc --explain E0503`.