Skip to content

Commit 226a8e2

Browse files
authored
Rollup merge of rust-lang#68842 - Centril:issue-68785, r=estebank
or_patterns: add regression test for rust-lang#68785 Fixes rust-lang#68785. (Fixed by rust-lang#67668.) cc rust-lang#54883 r? @estebank
2 parents f6bfdf4 + ce6cd67 commit 226a8e2

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)