review comments: use if let
This commit is contained in:
parent
d2cb5a8c35
commit
be9e6af65e
1 changed files with 3 additions and 6 deletions
|
|
@ -429,12 +429,9 @@ fn check_arms<'tcx>(
|
|||
|
||||
hir::MatchSource::ForLoopDesugar |
|
||||
hir::MatchSource::Normal => {
|
||||
match pat.kind {
|
||||
box PatternKind::Range(..) => {
|
||||
// Covered in `is_useful() with more context`
|
||||
break;
|
||||
}
|
||||
_ => {}
|
||||
if let box PatternKind::Range(..) = pat.kind {
|
||||
// Covered by `overlapping_patterns` with more context
|
||||
break;
|
||||
}
|
||||
let mut err = cx.tcx.struct_span_lint_hir(
|
||||
lint::builtin::UNREACHABLE_PATTERNS,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue