blob: efd1a89694160f8c2e627e0684b89927a9638ab8 [file] [log] [blame]
fn main() {
struct A (i32, i32);
let a = A (0, 1);
match a {
A (1, 2, 3, 4) => {},
// { dg-error "this pattern has 4 fields but the corresponding tuple variant has 2 fields .E0023." "" { target *-*-* } .-1 }
A (1, 2, .., 3, 4) => {},
// { dg-error "this pattern has 4 fields but the corresponding tuple variant has 2 fields .E0023." "" { target *-*-* } .-1 }
A (.., 3, 4, 5) => {},
// { dg-error "this pattern has 3 fields but the corresponding tuple variant has 2 fields .E0023." "" { target *-*-* } .-1 }
_ => {}
}
}