Skip to content

Commit 10a37bf

Browse files
committed
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

+1-2
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)