]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/pat-tuple-2.rs
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[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 }