Auto merge of #89861 - nbdd0121:closure, r=wesleywiser
Closure capture cleanup & refactor Follow up of #89648 Each commit is self-contained and the rationale/changes are documented in the commit message, so it's advisable to review commit by commit. The code is significantly cleaner (at least IMO), but that could have some perf implication, so I'd suggest a perf run. r? `@wesleywiser` cc `@arora-aman`
This commit is contained in:
commit
22e491ac7e
23 changed files with 324 additions and 419 deletions
|
@ -726,7 +726,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
|
|||
);
|
||||
self.acc(self.exit_ln, var, ACC_READ | ACC_USE);
|
||||
}
|
||||
ty::UpvarCapture::ByValue(_) => {}
|
||||
ty::UpvarCapture::ByValue => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1481,7 +1481,7 @@ impl<'tcx> Liveness<'_, 'tcx> {
|
|||
for (&var_hir_id, min_capture_list) in closure_min_captures {
|
||||
for captured_place in min_capture_list {
|
||||
match captured_place.info.capture_kind {
|
||||
ty::UpvarCapture::ByValue(_) => {}
|
||||
ty::UpvarCapture::ByValue => {}
|
||||
ty::UpvarCapture::ByRef(..) => continue,
|
||||
};
|
||||
let span = captured_place.get_capture_kind_span(self.ir.tcx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue