rust/src/test/ui/borrowck/borrowck-insert-during-each.stderr

16 lines
544 B
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
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`.