rust/tests/ui/or-patterns/issue-68785-irrefutable-param-with-at.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
190 B
Rust
Raw Normal View History

// check-pass
enum MyEnum {
FirstCase(u8),
OtherCase(u16),
}
fn my_fn(x @ (MyEnum::FirstCase(_) | MyEnum::OtherCase(_)): MyEnum) {}
fn main() {
my_fn(MyEnum::FirstCase(0));
}