This diagnostic output
|
error[E0501]: cannot borrow `*a` as mutable because previous closure requires unique access |
|
--> $DIR/E0501.rs:28:23 |
|
| |
|
LL | let bar = || { |
|
| -- closure construction occurs here |
|
LL | inside_closure(a) |
|
| - first borrow occurs due to use of `a` in closure |
|
LL | }; |
|
LL | outside_closure_1(a); //[ast]~ ERROR cannot borrow `*a` as mutable because previous closure requires unique access |
|
| ^ borrow occurs here |
|
... |
|
LL | drop(bar); |
|
| --- first borrow later used here |
is not a regression, per se. But we put in effort to identify something as the "first borrow" (rather than "previous borrow"); that means we should similarly identify the other borrow as the "second borrow".
This diagnostic output
rust/src/test/ui/E0501.ast.nll.stderr
Lines 1 to 13 in f99911a
is not a regression, per se. But we put in effort to identify something as the "first borrow" (rather than "previous borrow"); that means we should similarly identify the other borrow as the "second borrow".