mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
13 lines
191 B
Rust
13 lines
191 B
Rust
//@ check-pass
|
|
|
|
enum MyEnum {
|
|
FirstCase(u8),
|
|
OtherCase(u16),
|
|
}
|
|
|
|
fn my_fn(x @ (MyEnum::FirstCase(_) | MyEnum::OtherCase(_)): MyEnum) {}
|
|
|
|
fn main() {
|
|
my_fn(MyEnum::FirstCase(0));
|
|
}
|