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
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ impl<'tcx> LateLintPass<'tcx> for ForLoopOverFallibles {
|
||||||
(expr.span.with_hi(pat.span.lo()), format!("if let {var}(")),
|
(expr.span.with_hi(pat.span.lo()), format!("if let {var}(")),
|
||||||
(pat.span.between(arg.span), format!(") = ")),
|
(pat.span.between(arg.span), format!(") = ")),
|
||||||
],
|
],
|
||||||
Applicability::MachineApplicable,
|
Applicability::MaybeIncorrect,
|
||||||
);
|
);
|
||||||
|
|
||||||
warn.emit()
|
warn.emit()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue