summaryrefslogtreecommitdiffstats
path: root/tests/ui/feature-gates/feature-gate-unnamed_fields.rs
blob: 4bbd0c83bfbcae49e86a17f979ef9f6408003fb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
struct Foo {
    foo: u8,
    _: union { //~ ERROR unnamed fields are not yet fully implemented [E0658]
    //~^ ERROR unnamed fields are not yet fully implemented [E0658]
    //~| ERROR anonymous unions are unimplemented
        bar: u8,
        baz: u16
    }
}

union Bar {
    foobar: u8,
    _: struct { //~ ERROR unnamed fields are not yet fully implemented [E0658]
    //~^ ERROR unnamed fields are not yet fully implemented [E0658]
    //~| ERROR anonymous structs are unimplemented
        foobaz: u8,
        barbaz: u16
    }
}

struct S;
struct Baz {
    _: S //~ ERROR unnamed fields are not yet fully implemented [E0658]
}

fn main(){}