Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 10a37bf

Browse files
committedJun 28, 2021
fixup! Editon 2021 enables precise capture
1 parent b89ea96 commit 10a37bf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

‎compiler/rustc_mir_build/src/build/expr/as_place.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,7 @@ fn to_upvars_resolved_place_builder<'a, 'tcx>(
246246
return Err(from_builder);
247247
};
248248

249-
let closure_ty = typeck_results
250-
.node_type(tcx.hir().local_def_id_to_hir_id(closure_def_id.expect_local()));
249+
let closure_ty = typeck_results.node_type(closure_hir_id);
251250

252251
let substs = match closure_ty.kind() {
253252
ty::Closure(_, substs) => ty::UpvarSubsts::Closure(substs),

0 commit comments

Comments
 (0)
Please sign in to comment.