summaryrefslogtreecommitdiffstats
path: root/src/test/ui/rfc-2294-if-let-guard/run-pass.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/rfc-2294-if-let-guard/run-pass.rs')
-rw-r--r--src/test/ui/rfc-2294-if-let-guard/run-pass.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/ui/rfc-2294-if-let-guard/run-pass.rs b/src/test/ui/rfc-2294-if-let-guard/run-pass.rs
index 3da57989d..a303a0d1f 100644
--- a/src/test/ui/rfc-2294-if-let-guard/run-pass.rs
+++ b/src/test/ui/rfc-2294-if-let-guard/run-pass.rs
@@ -30,4 +30,11 @@ fn main() {
Some(x) if let Foo::Qux(y) = qux(x) => assert_eq!(y, 84),
_ => panic!(),
}
+
+ // issue #88015
+ #[allow(irrefutable_let_patterns)]
+ match () {
+ () | () if let x = 42 => assert_eq!(x, 42),
+ _ => panic!()
+ }
}