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:
Maybe Waffle 2022-07-25 01:04:27 +04:00
parent 23a7674e3e
commit 8ca57b54c1

View File

@ -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()