]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pattern/pat-tuple-overfield.rs
Remove licenses
[rust.git] / src / test / ui / pattern / pat-tuple-overfield.rs
1 struct S(u8, u8, u8);
2
3 fn main() {
4     match (1, 2, 3) {
5         (1, 2, 3, 4) => {} //~ ERROR mismatched types
6         (1, 2, .., 3, 4) => {} //~ ERROR mismatched types
7         _ => {}
8     }
9     match S(1, 2, 3) {
10         S(1, 2, 3, 4) => {}
11         //~^ ERROR this pattern has 4 fields, but the corresponding tuple struct has 3 fields
12         S(1, 2, .., 3, 4) => {}
13         //~^ ERROR this pattern has 4 fields, but the corresponding tuple struct has 3 fields
14         _ => {}
15     }
16 }