Closure capture borrow diagnostics for disjoint captures

This commit is contained in:
Chris Pardy 2021-03-17 02:51:27 -04:00
parent 6e2a34474b
commit 08c4fbcea7
56 changed files with 532 additions and 152 deletions

View file

@ -7,7 +7,7 @@ LL |
LL | let x = move || {
| ^^^^^^^ move out of `fancy_num` occurs here
LL | println!("child function: {}", fancy_num.num);
| --------- move occurs due to use in closure
| ------------- move occurs due to use in closure
...
LL | println!("main function: {}", fancy_ref.num);
| ------------- borrow later used here