Unreachable subpatterns are rare
We may as well leave early when we know there's nothing to report.
This commit is contained in:
parent
b025813f03
commit
d5a7ec0929
@ -389,6 +389,8 @@ fn check_arms<'p, 'tcx>(
|
||||
hir::MatchSource::AwaitDesugar | hir::MatchSource::TryDesugar => {}
|
||||
}
|
||||
}
|
||||
Useful(unreachables) if unreachables.is_empty() => {}
|
||||
// The arm is reachable, but contains unreachable subpatterns (from or-patterns).
|
||||
Useful(unreachables) => {
|
||||
let mut unreachables: Vec<_> = unreachables.into_iter().flatten().collect();
|
||||
// Emit lints in the order in which they occur in the file.
|
||||
|
Loading…
Reference in New Issue
Block a user