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