summary refs log tree commit diff
path: root/src/test/ui/borrowck/borrowck-insert-during-each.stderr
blob: 021b5b27ae7024d9497bfafb9d2b46d91aeb3004 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
error[E0500]: closure requires unique access to `f` but `*f` is already borrowed
  --> $DIR/borrowck-insert-during-each.rs:17:9
   |
LL |   f.foo(
   |   - borrow occurs here
LL |         |a| { //~ ERROR closure requires unique access to `f`
   |         ^^^ closure construction occurs here
LL |             f.n.insert(*a);
   |             - borrow occurs due to use of `f` in closure
LL |         })
   |          - borrow ends here

error: aborting due to previous error

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