]> git.proxmox.com Git - rustc.git/blob - tests/ui/error-codes/E0063.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / error-codes / E0063.rs
1 struct SingleFoo {
2 x: i32
3 }
4
5 struct PluralFoo {
6 x: i32,
7 y: i32,
8 z: i32
9 }
10
11 struct TruncatedFoo {
12 a: i32,
13 b: i32,
14 x: i32,
15 y: i32,
16 z: i32
17 }
18
19 struct TruncatedPluralFoo {
20 a: i32,
21 b: i32,
22 c: i32,
23 x: i32,
24 y: i32,
25 z: i32
26 }
27
28
29 fn main() {
30 let w = SingleFoo { };
31 //~^ ERROR missing field `x` in initializer of `SingleFoo`
32 let x = PluralFoo {x: 1};
33 //~^ ERROR missing fields `y` and `z` in initializer of `PluralFoo`
34 let y = TruncatedFoo{x:1};
35 //~^ missing fields `a`, `b`, `y` and 1 other field in initializer of `TruncatedFoo`
36 let z = TruncatedPluralFoo{x:1};
37 //~^ ERROR missing fields `a`, `b`, `c` and 2 other fields in initializer of `TruncatedPluralFoo`
38 }