summaryrefslogtreecommitdiffstats
path: root/tests/ui/unboxed-closures/unboxed-closures-borrow-conflict.stderr
blob: 98fe97c5c1814e5051bb02c8ae49a3f1e21253e1 (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
   |             |
   |             `x` is borrowed 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`.