rust/tests/ui/thir-tree-match.rs
2023-01-26 18:10:45 +01:00

23 lines
319 B
Rust

// check-pass
// compile-flags: -Zunpretty=thir-tree
enum Bar {
First,
Second,
Third,
}
enum Foo {
FooOne(Bar),
FooTwo,
}
fn has_match(foo: Foo) -> bool {
match foo {
Foo::FooOne(Bar::First) => true,
Foo::FooOne(_) => false,
Foo::FooTwo => true,
}
}
fn main() {}