Skip to content

Commit

Permalink
Enable 2021 compatibility lints for all in-tree code
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
Mark-Simulacrum committed Sep 20, 2021
1 parent d37f109 commit ede8679
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion clippy_utils/src/lib.rs
Expand Up @@ -990,7 +990,10 @@ pub fn can_move_expr_to_closure(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) ->
captures: HirIdMap::default(),
};
v.visit_expr(expr);
v.allow_closure.then(|| v.captures)
v.allow_closure.then(|| {
let _ = &v;
v.captures
})
}

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

0 comments on commit ede8679

Please sign in to comment.