Skip to content

Commit 72649cf

Browse files
authored
Rollup merge of rust-lang#99186 - camsteffen:closure-localdefid, r=cjgillot
Use LocalDefId for closures more
2 parents 3641b0c + 6290772 commit 72649cf

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)