]> git.lizzy.rs Git - rust.git/blob - tests/ui/binding/match-enum-struct-1.rs
Rollup merge of #106644 - alexcrichton:update-wasi-toolchain, r=cuviper
[rust.git] / tests / 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 }