Skip to content

Commit 1183371

Browse files
Remove Drop-caused migration-added captures
All of these were added due to insignificant Drop types being present.
1 parent ede8679 commit 1183371

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

clippy_utils/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -990,10 +990,7 @@ pub fn can_move_expr_to_closure(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) ->
990990
captures: HirIdMap::default(),
991991
};
992992
v.visit_expr(expr);
993-
v.allow_closure.then(|| {
994-
let _ = &v;
995-
v.captures
996-
})
993+
v.allow_closure.then(|| v.captures)
997994
}
998995

999996
/// Returns the method names and argument list of nested method call expressions that make up

0 commit comments

Comments
 (0)