rust/tests/ui/binding/match-struct-0.rs
2023-01-11 09:32:08 +00:00

22 lines
303 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!(),
_ => (),
}
}