1 error[E0423]: expected function, tuple struct or tuple variant, found struct `TupleStruct`
2 --> $DIR/struct.rs:20:14
4 LL | let ts = TupleStruct(640, 480);
5 | ^^^^^^^^^^^ constructor is not visible here due to private fields
7 error[E0423]: expected value, found struct `UnitStruct`
8 --> $DIR/struct.rs:29:14
10 LL | let us = UnitStruct;
11 | ^^^^^^^^^^ constructor is not visible here due to private fields
13 error[E0603]: tuple struct constructor `TupleStruct` is private
14 --> $DIR/struct.rs:23:32
16 LL | let ts_explicit = structs::TupleStruct(640, 480);
17 | ^^^^^^^^^^^ private tuple struct constructor
19 ::: $DIR/auxiliary/structs.rs:11:24
21 LL | pub struct TupleStruct(pub u16, pub u16);
22 | ---------------- a constructor is private if any of the fields is private
24 note: the tuple struct constructor `TupleStruct` is defined here
25 --> $DIR/auxiliary/structs.rs:11:1
27 LL | pub struct TupleStruct(pub u16, pub u16);
28 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30 error[E0603]: unit struct `UnitStruct` is private
31 --> $DIR/struct.rs:32:32
33 LL | let us_explicit = structs::UnitStruct;
34 | ^^^^^^^^^^ private unit struct
36 note: the unit struct `UnitStruct` is defined here
37 --> $DIR/auxiliary/structs.rs:8:1
39 LL | pub struct UnitStruct;
40 | ^^^^^^^^^^^^^^^^^^^^^^
42 error[E0639]: cannot create non-exhaustive struct using struct expression
43 --> $DIR/struct.rs:7:14
45 LL | let fr = FunctionalRecord {
48 LL | | first_field: 1920,
49 LL | | second_field: 1080,
50 LL | | ..FunctionalRecord::default()
54 error[E0639]: cannot create non-exhaustive struct using struct expression
55 --> $DIR/struct.rs:14:14
57 LL | let ns = NormalStruct { first_field: 640, second_field: 480 };
58 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60 error[E0638]: `..` required with struct marked as non-exhaustive
61 --> $DIR/struct.rs:17:9
63 LL | let NormalStruct { first_field, second_field } = ns;
64 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66 help: add `..` at the end of the field list to ignore all other fields
68 LL | let NormalStruct { first_field, second_field , .. } = ns;
71 error[E0638]: `..` required with struct marked as non-exhaustive
72 --> $DIR/struct.rs:26:9
74 LL | let TupleStruct { 0: first_field, 1: second_field } = ts;
75 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
77 help: add `..` at the end of the field list to ignore all other fields
79 LL | let TupleStruct { 0: first_field, 1: second_field , .. } = ts;
82 error[E0638]: `..` required with struct marked as non-exhaustive
83 --> $DIR/struct.rs:35:9
85 LL | let UnitStruct { } = us;
88 help: add `..` at the end of the field list to ignore all other fields
90 LL | let UnitStruct { .. } = us;
93 error: aborting due to 9 previous errors
95 Some errors have detailed explanations: E0423, E0603, E0638, E0639.
96 For more information about an error, try `rustc --explain E0423`.