rust/tests/ui/thir-print/thir-tree-match.rs

24 lines
319 B
Rust
Raw Normal View History

2023-01-17 15:11:18 -06:00
// 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() {}