for_loop_over_fallibles
: don't use MachineApplicable
The loop could contain `break;` that won't work with an `if let`
This commit is contained in:
parent
23a7674e3e
commit
8ca57b54c1
@ -113,7 +113,7 @@ fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
|
||||
(expr.span.with_hi(pat.span.lo()), format!("if let {var}(")),
|
||||
(pat.span.between(arg.span), format!(") = ")),
|
||||
],
|
||||
Applicability::MachineApplicable,
|
||||
Applicability::MaybeIncorrect,
|
||||
);
|
||||
|
||||
warn.emit()
|
||||
|
Loading…
Reference in New Issue
Block a user