fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.2 KiB84 linesraw
1error[E0784]: union expressions should have exactly one field
2  --> $DIR/union-fields-2.rs:10:13
3   |
4LL |     let u = U {};
5   |             ^
6
7error[E0784]: union expressions should have exactly one field
8  --> $DIR/union-fields-2.rs:12:13
9   |
10LL |     let u = U { a: 0, b: 1 };
11   |             ^
12
13error[E0560]: union `U` has no field named `c`
14  --> $DIR/union-fields-2.rs:13:29
15   |
16LL |     let u = U { a: 0, b: 1, c: 2 };
17   |                             ^ `U` does not have this field
18   |
19   = note: all struct fields are already assigned
20
21error[E0784]: union expressions should have exactly one field
22  --> $DIR/union-fields-2.rs:13:13
23   |
24LL |     let u = U { a: 0, b: 1, c: 2 };
25   |             ^
26
27error[E0784]: union expressions should have exactly one field
28  --> $DIR/union-fields-2.rs:15:13
29   |
30LL |     let u = U { ..u };
31   |             ^
32
33error[E0436]: functional record update syntax requires a struct
34  --> $DIR/union-fields-2.rs:15:19
35   |
36LL |     let u = U { ..u };
37   |                   ^
38
39error: union patterns should have exactly one field
40  --> $DIR/union-fields-2.rs:18:9
41   |
42LL |     let U {} = u;
43   |         ^^^^
44
45error: union patterns should have exactly one field
46  --> $DIR/union-fields-2.rs:20:9
47   |
48LL |     let U { a, b } = u;
49   |         ^^^^^^^^^^
50
51error: union patterns should have exactly one field
52  --> $DIR/union-fields-2.rs:21:9
53   |
54LL |     let U { a, b, c } = u;
55   |         ^^^^^^^^^^^^^
56
57error[E0026]: union `U` does not have a field named `c`
58  --> $DIR/union-fields-2.rs:21:19
59   |
60LL |     let U { a, b, c } = u;
61   |                   ^ union `U` does not have this field
62
63error: union patterns should have exactly one field
64  --> $DIR/union-fields-2.rs:23:9
65   |
66LL |     let U { .. } = u;
67   |         ^^^^^^^^
68
69error: `..` cannot be used in union patterns
70  --> $DIR/union-fields-2.rs:23:9
71   |
72LL |     let U { .. } = u;
73   |         ^^^^^^^^
74
75error: `..` cannot be used in union patterns
76  --> $DIR/union-fields-2.rs:25:9
77   |
78LL |     let U { a, .. } = u;
79   |         ^^^^^^^^^^^
80
81error: aborting due to 13 previous errors
82
83Some errors have detailed explanations: E0026, E0436, E0560, E0784.
84For more information about an error, try `rustc --explain E0026`.