mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
22 lines
304 B
Rust
22 lines
304 B
Rust
//@ run-pass
|
|
|
|
struct Foo{
|
|
f : isize,
|
|
}
|
|
|
|
pub fn main() {
|
|
let f = Foo{f: 1};
|
|
match f {
|
|
Foo{f: 0} => panic!(),
|
|
Foo{..} => (),
|
|
}
|
|
match f {
|
|
Foo{f: 0} => panic!(),
|
|
Foo{f: _f} => (),
|
|
}
|
|
match f {
|
|
Foo{f: 0} => panic!(),
|
|
_ => (),
|
|
}
|
|
}
|