review comments: use if let

This commit is contained in:
Esteban Küber 2019-08-29 17:41:41 -07:00
parent d2cb5a8c35
commit be9e6af65e

View file

@ -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,