mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
24 lines
321 B
Rust
24 lines
321 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() {}
|