]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/match-enum-struct-1.rs
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[rust.git] / src / test / ui / binding / match-enum-struct-1.rs
1 // run-pass
2 #![allow(dead_code)]
3
4 enum E {
5     Foo{f : isize},
6     Bar
7 }
8
9 pub fn main() {
10     let e = E::Foo{f: 1};
11     match e {
12         E::Foo{..} => (),
13         _ => panic!(),
14     }
15     match e {
16         E::Foo{f: _f} => (),
17         _ => panic!(),
18     }
19 }