]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/pat-tuple-2.rs
Merge commit 'e36a20c24f35a4cee82bbdc600289104c9237c22' into ra-sync-and-pms-component
[rust.git] / src / test / ui / binding / pat-tuple-2.rs
1 // run-pass
2 fn tuple() {
3     let x = (1,);
4     match x {
5         (2, ..) => panic!(),
6         (..) => ()
7     }
8 }
9
10 fn tuple_struct() {
11     struct S(u8);
12
13     let x = S(1);
14     match x {
15         S(2, ..) => panic!(),
16         S(..) => ()
17     }
18 }
19
20 fn main() {
21     tuple();
22     tuple_struct();
23 }