From c4d5471a45dbdddccb74bb505864cab284df21fd Mon Sep 17 00:00:00 2001 From: Michael Wright Date: Wed, 20 Oct 2021 06:13:42 +0200 Subject: [PATCH] Add test for #7829 --- tests/ui/match_overlapping_arm.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/ui/match_overlapping_arm.rs b/tests/ui/match_overlapping_arm.rs index ff91c4498ec6..845986a4eada 100644 --- a/tests/ui/match_overlapping_arm.rs +++ b/tests/ui/match_overlapping_arm.rs @@ -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) {