Skip to content

Commit 6290772

Browse files
committed
Use LocalDefId for closures more
1 parent ab7e555 commit 6290772

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_utils/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ pub fn can_move_expr_to_closure<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'
968968
}
969969
},
970970
ExprKind::Closure { .. } => {
971-
let closure_id = self.cx.tcx.hir().local_def_id(e.hir_id).to_def_id();
971+
let closure_id = self.cx.tcx.hir().local_def_id(e.hir_id);
972972
for capture in self.cx.typeck_results().closure_min_captures_flattened(closure_id) {
973973
let local_id = match capture.place.base {
974974
PlaceBase::Local(id) => id,

0 commit comments

Comments
 (0)