summaryrefslogtreecommitdiffstats
path: root/src/test/ui/pattern/issue-74539.rs
blob: 0b25f87ec5340d6792fd7d4784ce8ceaf47f1b0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
enum E {
    A(u8, u8),
}

fn main() {
    let e = E::A(2, 3);
    match e {
        E::A(x @ ..) => {
            //~^ ERROR: `x @` is not allowed in a tuple struct
            //~| ERROR: `..` patterns are not allowed here
            //~| ERROR: this pattern has 1 field, but the corresponding tuple variant has 2 fields
            x
        }
    };
}