]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/match-struct-0.rs
Rollup merge of #104793 - nicholasbishop:bishop-add-efiapi, r=JohnTitor
[rust.git] / src / test / ui / binding / match-struct-0.rs
1 // run-pass
2
3 struct Foo{
4     f : isize,
5 }
6
7 pub fn main() {
8     let f = Foo{f: 1};
9     match f {
10         Foo{f: 0} => panic!(),
11         Foo{..} => (),
12     }
13     match f {
14         Foo{f: 0} => panic!(),
15         Foo{f: _f} => (),
16     }
17     match f {
18         Foo{f: 0} => panic!(),
19         _ => (),
20     }
21 }