]> git.proxmox.com Git - rustc.git/blob - src/test/ui/borrowck/borrowck-insert-during-each.stderr
New upstream version 1.36.0+dfsg1
[rustc.git] / src / test / ui / borrowck / borrowck-insert-during-each.stderr
1 error[E0501]: cannot borrow `*f` as mutable because previous closure requires unique access
2 --> $DIR/borrowck-insert-during-each.rs:16:5
3 |
4 LL | f.foo(
5 | ^ --- first borrow later used by call
6 | _____|
7 | |
8 LL | |
9 LL | | |a| {
10 | | --- closure construction occurs here
11 LL | | f.n.insert(*a);
12 | | - first borrow occurs due to use of `f` in closure
13 LL | | })
14 | |__________^ second borrow occurs here
15
16 error[E0500]: closure requires unique access to `f` but it is already borrowed
17 --> $DIR/borrowck-insert-during-each.rs:18:9
18 |
19 LL | f.foo(
20 | - --- first borrow later used by call
21 | |
22 | borrow occurs here
23 LL |
24 LL | |a| {
25 | ^^^ closure construction occurs here
26 LL | f.n.insert(*a);
27 | - second borrow occurs due to use of `f` in closure
28
29 error: aborting due to 2 previous errors
30
31 Some errors have detailed explanations: E0500, E0501.
32 For more information about an error, try `rustc --explain E0500`.