Skip to content

Commit ce6cd67

Browse files
committed
or_patterns: add regression test for 68785
1 parent c9290dc commit ce6cd67

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// check-pass
2+
3+
#![feature(or_patterns)]
4+
5+
enum MyEnum {
6+
FirstCase(u8),
7+
OtherCase(u16),
8+
}
9+
10+
fn my_fn(x @ (MyEnum::FirstCase(_) | MyEnum::OtherCase(_)): MyEnum) {}
11+
12+
fn main() {
13+
my_fn(MyEnum::FirstCase(0));
14+
}

0 commit comments

Comments
 (0)