blob: 30648edffd8179fc84bc0c85f69aabcb07473919 [file] [log] [blame]
error[E0500]: closure requires unique access to `f` but `*f` is already borrowed
--> $DIR/borrowck-insert-during-each.rs:27: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`.