Skip to content

Commit

Permalink
or_patterns: add regression test for 68785
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Feb 5, 2020
1 parent c9290dc commit ce6cd67
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/ui/or-patterns/issue-68785-irrefutable-param-with-at.rs
Original file line number Diff line number Diff line change
@@ -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));
}

0 comments on commit ce6cd67

Please sign in to comment.