We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2cb5a8 commit be9e6afCopy full SHA for be9e6af
src/librustc_mir/hair/pattern/check_match.rs
@@ -429,12 +429,9 @@ fn check_arms<'tcx>(
429
430
hir::MatchSource::ForLoopDesugar |
431
hir::MatchSource::Normal => {
432
- match pat.kind {
433
- box PatternKind::Range(..) => {
434
- // Covered in `is_useful() with more context`
435
- break;
436
- }
437
- _ => {}
+ if let box PatternKind::Range(..) = pat.kind {
+ // Covered by `overlapping_patterns` with more context
+ break;
438
}
439
let mut err = cx.tcx.struct_span_lint_hir(
440
lint::builtin::UNREACHABLE_PATTERNS,
0 commit comments