Skip to content

Commit ede8679

Browse files
Enable 2021 compatibility lints for all in-tree code
This just applies the suggested fixes from the compatibility warnings, leaving any that are in practice spurious in. This is primarily intended to provide a starting point to identify possible fixes to the migrations (e.g., by avoiding spurious warnings). A secondary commit cleans these up where they are false positives (as is true in many of the cases).
1 parent d37f109 commit ede8679

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

clippy_utils/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,10 @@ 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(|| v.captures)
993+
v.allow_closure.then(|| {
994+
let _ = &v;
995+
v.captures
996+
})
994997
}
995998

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

0 commit comments

Comments
 (0)