or_patterns: add regression test for 68785
This commit is contained in:
parent
c9290dceee
commit
ce6cd6709f
1 changed files with 14 additions and 0 deletions
|
|
@ -0,0 +1,14 @@
|
|||
// check-pass
|
||||
|
||||
#![feature(or_patterns)]
|
||||
|
||||
enum MyEnum {
|
||||
FirstCase(u8),
|
||||
OtherCase(u16),
|
||||
}
|
||||
|
||||
fn my_fn(x @ (MyEnum::FirstCase(_) | MyEnum::OtherCase(_)): MyEnum) {}
|
||||
|
||||
fn main() {
|
||||
my_fn(MyEnum::FirstCase(0));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue