2018-08-08 07:28:26 -05:00
|
|
|
error[E0500]: closure requires unique access to `f` but `*f` is already borrowed
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/borrowck-insert-during-each.rs:17:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | f.foo(
|
|
|
|
| - borrow occurs here
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | |a| {
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^ 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`.
|