summaryrefslogtreecommitdiffstats
path: root/tests/ui/structs/struct-tuple-field-names.rs
blob: 7bd54af1dbee53469b0d6d7c93a7dee7cbc61e3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
struct S(i32, f32);
enum E {
    S(i32, f32),
}
fn main() {
    let x = E::S(1, 2.2);
    match x {
        E::S { 0, 1 } => {}
        //~^ ERROR tuple variant `E::S` written as struct variant [E0769]
    }
    let y = S(1, 2.2);
    match y {
        S { } => {} //~ ERROR: tuple variant `S` written as struct variant [E0769]
    }
}