Skip to content

Commit

Permalink
Rollup merge of rust-lang#68842 - Centril:issue-68785, r=estebank
Browse files Browse the repository at this point in the history
or_patterns: add regression test for rust-lang#68785

Fixes rust-lang#68785.

(Fixed by rust-lang#67668.)

cc rust-lang#54883
r? @estebank
  • Loading branch information
Dylan-DPC committed Feb 6, 2020
2 parents f6bfdf4 + ce6cd67 commit 226a8e2
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 226a8e2

Please sign in to comment.