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).
This commit is contained in:
parent
d37f1091e8
commit
ede86797bd
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user