mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 02:00:00 +03:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user