]> git.proxmox.com Git - rustc.git/blob - src/test/ui/feature-gates/feature-gate-unnamed_fields.rs
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / feature-gates / feature-gate-unnamed_fields.rs
1 struct Foo {
2 foo: u8,
3 _: union { //~ ERROR unnamed fields are not yet fully implemented [E0658]
4 //~^ ERROR unnamed fields are not yet fully implemented [E0658]
5 //~| ERROR anonymous unions are unimplemented
6 bar: u8,
7 baz: u16
8 }
9 }
10
11 union Bar {
12 foobar: u8,
13 _: struct { //~ ERROR unnamed fields are not yet fully implemented [E0658]
14 //~^ ERROR unnamed fields are not yet fully implemented [E0658]
15 //~| ERROR anonymous structs are unimplemented
16 //~| ERROR unions may not contain fields that need dropping [E0740]
17 foobaz: u8,
18 barbaz: u16
19 }
20 }
21
22 struct S;
23 struct Baz {
24 _: S //~ ERROR unnamed fields are not yet fully implemented [E0658]
25 }
26
27 fn main(){}