summaryrefslogtreecommitdiffstats
path: root/tests/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr
blob: 21d6b4fde7e905f94f49affc7d58a1770be38199 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
error[E0503]: cannot use `x` because it was mutably borrowed
  --> $DIR/unboxed-closures-borrow-conflict.rs:9:14
   |
LL |     let f = || x += 1;
   |             -- - borrow occurs due to use of `x` in closure
   |             |
   |             borrow of `x` occurs here
LL |     let _y = x;
   |              ^ use of borrowed `x`
LL |     f;
   |     - borrow later used here

error: aborting due to previous error

For more information about this error, try `rustc --explain E0503`.