Rollup merge of #68842 - Centril:issue-68785, r=estebank
or_patterns: add regression test for #68785 Fixes https://github.com/rust-lang/rust/issues/68785. (Fixed by https://github.com/rust-lang/rust/pull/67668.) cc https://github.com/rust-lang/rust/issues/54883 r? @estebank
This commit is contained in:
commit
226a8e2932
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