1
Fork 0

Rollup merge of #99186 - camsteffen:closure-localdefid, r=cjgillot

Use LocalDefId for closures more
This commit is contained in:
Dylan DPC 2022-07-31 17:36:40 +05:30 committed by GitHub
commit 403c1b3802
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 164 additions and 171 deletions

View file

@ -519,7 +519,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
fn new(ir: &'a mut IrMaps<'tcx>, body_owner: LocalDefId) -> Liveness<'a, 'tcx> {
let typeck_results = ir.tcx.typeck(body_owner);
let param_env = ir.tcx.param_env(body_owner);
let closure_min_captures = typeck_results.closure_min_captures.get(&body_owner.to_def_id());
let closure_min_captures = typeck_results.closure_min_captures.get(&body_owner);
let closure_ln = ir.add_live_node(ClosureNode);
let exit_ln = ir.add_live_node(ExitNode);