Auto merge of #7847 - mikerite:fix-7829, r=flip1995

Fix false positive in `match_overlapping_arm`

Fixes #7829

changelog: Fix false positive in [`match_overlapping_arm`].
This commit is contained in:
bors 2021-10-28 08:59:21 +00:00
commit 89a11564cc
4 changed files with 92 additions and 102 deletions

View file

@ -100,6 +100,13 @@ fn overlapping() {
_ => (),
}
// Issue #7829
match 0 {
-1..=1 => (),
-2..=2 => (),
_ => (),
}
if let None = Some(42) {
// nothing
} else if let None = Some(42) {