fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
2.2 KiB66 linesraw
1error[E0423]: expected function, found struct `TupleStruct`
2  --> $DIR/struct.rs:20:14
3   |
4LL |     let ts = TupleStruct(640, 480);
5   |              ^^^^^^^^^^^ constructor is not visible here due to private fields
6
7error[E0423]: expected value, found struct `UnitStruct`
8  --> $DIR/struct.rs:29:14
9   |
10LL |     let us = UnitStruct;
11   |              ^^^^^^^^^^ constructor is not visible here due to private fields
12
13error[E0603]: tuple struct `TupleStruct` is private
14  --> $DIR/struct.rs:23:32
15   |
16LL |     let ts_explicit = structs::TupleStruct(640, 480);
17   |                                ^^^^^^^^^^^
18   |
19   = note: a tuple struct constructor is private if any of its fields is private
20
21error[E0603]: unit struct `UnitStruct` is private
22  --> $DIR/struct.rs:32:32
23   |
24LL |     let us_explicit = structs::UnitStruct;
25   |                                ^^^^^^^^^^
26
27error[E0639]: cannot create non-exhaustive struct using struct expression
28  --> $DIR/struct.rs:7:14
29   |
30LL |       let fr = FunctionalRecord {
31   |  ______________^
32LL | |
33LL | |         first_field: 1920,
34LL | |         second_field: 1080,
35LL | |         ..FunctionalRecord::default()
36LL | |     };
37   | |_____^
38
39error[E0639]: cannot create non-exhaustive struct using struct expression
40  --> $DIR/struct.rs:14:14
41   |
42LL |     let ns = NormalStruct { first_field: 640, second_field: 480 };
43   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44
45error[E0638]: `..` required with struct marked as non-exhaustive
46  --> $DIR/struct.rs:17:9
47   |
48LL |     let NormalStruct { first_field, second_field } = ns;
49   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50
51error[E0638]: `..` required with struct marked as non-exhaustive
52  --> $DIR/struct.rs:26:9
53   |
54LL |     let TupleStruct { 0: first_field, 1: second_field } = ts;
55   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56
57error[E0638]: `..` required with struct marked as non-exhaustive
58  --> $DIR/struct.rs:35:9
59   |
60LL |     let UnitStruct { } = us;
61   |         ^^^^^^^^^^^^^^
62
63error: aborting due to 9 previous errors
64
65Some errors have detailed explanations: E0423, E0603, E0638, E0639.
66For more information about an error, try `rustc --explain E0423`.