]> git.proxmox.com Git - rustc.git/blame - src/test/ui/E0501.stderr
New upstream version 1.36.0+dfsg1
[rustc.git] / src / test / ui / E0501.stderr
CommitLineData
b7449926 1error[E0501]: cannot borrow `*a` as mutable because previous closure requires unique access
48663c56 2 --> $DIR/E0501.rs:14:23
b7449926
XL
3 |
4LL | let bar = || {
5 | -- closure construction occurs here
6LL | inside_closure(a)
7 | - first borrow occurs due to use of `a` in closure
8LL | };
532ac7d7 9LL | outside_closure_1(a);
0731742a 10 | ^ second borrow occurs here
b7449926
XL
11...
12LL | drop(bar);
0bf4aa26 13 | --- first borrow later used here
b7449926
XL
14
15error[E0501]: cannot borrow `*a` as immutable because previous closure requires unique access
48663c56 16 --> $DIR/E0501.rs:17:23
b7449926
XL
17 |
18LL | let bar = || {
19 | -- closure construction occurs here
20LL | inside_closure(a)
21 | - first borrow occurs due to use of `a` in closure
22...
532ac7d7 23LL | outside_closure_2(a);
0731742a 24 | ^ second borrow occurs here
b7449926
XL
25...
26LL | drop(bar);
0bf4aa26 27 | --- first borrow later used here
b7449926
XL
28
29error: aborting due to 2 previous errors
30
31For more information about this error, try `rustc --explain E0501`.