|
1 | | -error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0 |
2 | | - --> $DIR/repr-transparent.rs:11:1 |
3 | | - | |
4 | | -LL | struct NoFields; |
5 | | - | ^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0 |
6 | | - |
7 | | -error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0 |
8 | | - --> $DIR/repr-transparent.rs:14:1 |
9 | | - | |
10 | | -LL | struct ContainsOnlyZst(()); |
11 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0 |
12 | | - |
13 | | -error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0 |
14 | | - --> $DIR/repr-transparent.rs:17:1 |
15 | | - | |
16 | | -LL | struct ContainsOnlyZstArray([bool; 0]); |
17 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0 |
18 | | - |
19 | | -error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0 |
20 | | - --> $DIR/repr-transparent.rs:20:1 |
21 | | - | |
22 | | -LL | struct ContainsMultipleZst(PhantomData<*const i32>, NoFields); |
23 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0 |
24 | | - |
25 | | -error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 2 |
26 | | - --> $DIR/repr-transparent.rs:24:1 |
| 1 | +error[E0690]: transparent struct needs at most one non-zero-sized field, but has 2 |
| 2 | + --> $DIR/repr-transparent.rs:26:1 |
27 | 3 | | |
28 | 4 | LL | struct MultipleNonZst(u8, u8); |
29 | 5 | | ^^^^^^^^^^^^^^^^^^^^^^--^^--^^ |
30 | 6 | | | | | |
31 | 7 | | | | this field is non-zero-sized |
32 | 8 | | | this field is non-zero-sized |
33 | | - | needs exactly one non-zero-sized field, but has 2 |
| 9 | + | needs at most one non-zero-sized field, but has 2 |
34 | 10 |
|
35 | | -error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 2 |
36 | | - --> $DIR/repr-transparent.rs:30:1 |
| 11 | +error[E0690]: transparent struct needs at most one non-zero-sized field, but has 2 |
| 12 | + --> $DIR/repr-transparent.rs:32:1 |
37 | 13 | | |
38 | 14 | LL | pub struct StructWithProjection(f32, <f32 as Mirror>::It); |
39 | 15 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---^^-------------------^^ |
40 | 16 | | | | | |
41 | 17 | | | | this field is non-zero-sized |
42 | 18 | | | this field is non-zero-sized |
43 | | - | needs exactly one non-zero-sized field, but has 2 |
| 19 | + | needs at most one non-zero-sized field, but has 2 |
44 | 20 |
|
45 | 21 | error[E0691]: zero-sized field in transparent struct has alignment larger than 1 |
46 | | - --> $DIR/repr-transparent.rs:34:32 |
| 22 | + --> $DIR/repr-transparent.rs:36:32 |
47 | 23 | | |
48 | 24 | LL | struct NontrivialAlignZst(u32, [u16; 0]); |
49 | 25 | | ^^^^^^^^ has alignment larger than 1 |
50 | 26 |
|
51 | 27 | error[E0691]: zero-sized field in transparent struct has alignment larger than 1 |
52 | | - --> $DIR/repr-transparent.rs:40:24 |
| 28 | + --> $DIR/repr-transparent.rs:42:24 |
53 | 29 | | |
54 | 30 | LL | struct GenericAlign<T>(ZstAlign32<T>, u32); |
55 | 31 | | ^^^^^^^^^^^^^ has alignment larger than 1 |
56 | 32 |
|
57 | 33 | error[E0084]: unsupported representation for zero-variant enum |
58 | | - --> $DIR/repr-transparent.rs:42:1 |
| 34 | + --> $DIR/repr-transparent.rs:44:1 |
59 | 35 | | |
60 | 36 | LL | #[repr(transparent)] |
61 | 37 | | ^^^^^^^^^^^^^^^^^^^^ |
62 | 38 | LL | enum Void {} |
63 | 39 | | ------------ zero-variant enum |
64 | 40 |
|
65 | 41 | error[E0731]: transparent enum needs exactly one variant, but has 0 |
66 | | - --> $DIR/repr-transparent.rs:43:1 |
| 42 | + --> $DIR/repr-transparent.rs:45:1 |
67 | 43 | | |
68 | 44 | LL | enum Void {} |
69 | 45 | | ^^^^^^^^^ needs exactly one variant, but has 0 |
70 | 46 |
|
71 | | -error[E0690]: the variant of a transparent enum needs exactly one non-zero-sized field, but has 0 |
72 | | - --> $DIR/repr-transparent.rs:47:1 |
73 | | - | |
74 | | -LL | enum FieldlessEnum { |
75 | | - | ^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0 |
76 | | - |
77 | | -error[E0690]: the variant of a transparent enum needs exactly one non-zero-sized field, but has 2 |
78 | | - --> $DIR/repr-transparent.rs:52:1 |
| 47 | +error[E0690]: the variant of a transparent enum needs at most one non-zero-sized field, but has 2 |
| 48 | + --> $DIR/repr-transparent.rs:58:1 |
79 | 49 | | |
80 | 50 | LL | enum TooManyFieldsEnum { |
81 | | - | ^^^^^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 2 |
| 51 | + | ^^^^^^^^^^^^^^^^^^^^^^ needs at most one non-zero-sized field, but has 2 |
82 | 52 | LL | Foo(u32, String), |
83 | 53 | | --- ------ this field is non-zero-sized |
84 | 54 | | | |
85 | 55 | | this field is non-zero-sized |
86 | 56 |
|
87 | 57 | error[E0731]: transparent enum needs exactly one variant, but has 2 |
88 | | - --> $DIR/repr-transparent.rs:58:1 |
| 58 | + --> $DIR/repr-transparent.rs:64:1 |
89 | 59 | | |
90 | | -LL | enum TooManyVariants { |
91 | | - | ^^^^^^^^^^^^^^^^^^^^ needs exactly one variant, but has 2 |
| 60 | +LL | enum MultipleVariants { |
| 61 | + | ^^^^^^^^^^^^^^^^^^^^^ needs exactly one variant, but has 2 |
92 | 62 | LL | Foo(String), |
93 | 63 | | ----------- |
94 | 64 | LL | Bar, |
95 | | - | --- too many variants in `TooManyVariants` |
| 65 | + | --- too many variants in `MultipleVariants` |
96 | 66 |
|
97 | 67 | error[E0691]: zero-sized field in transparent enum has alignment larger than 1 |
98 | | - --> $DIR/repr-transparent.rs:65:14 |
| 68 | + --> $DIR/repr-transparent.rs:71:14 |
99 | 69 | | |
100 | 70 | LL | Foo(u32, [u16; 0]), |
101 | 71 | | ^^^^^^^^ has alignment larger than 1 |
102 | 72 |
|
103 | 73 | error[E0691]: zero-sized field in transparent enum has alignment larger than 1 |
104 | | - --> $DIR/repr-transparent.rs:70:11 |
| 74 | + --> $DIR/repr-transparent.rs:76:11 |
105 | 75 | | |
106 | 76 | LL | Foo { bar: ZstAlign32<T>, baz: u32 } |
107 | 77 | | ^^^^^^^^^^^^^^^^^^ has alignment larger than 1 |
108 | 78 |
|
109 | | -error[E0690]: transparent union needs exactly one non-zero-sized field, but has 0 |
110 | | - --> $DIR/repr-transparent.rs:74:1 |
111 | | - | |
112 | | -LL | union UnitUnion { |
113 | | - | ^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0 |
114 | | - |
115 | | -error[E0690]: transparent union needs exactly one non-zero-sized field, but has 2 |
116 | | - --> $DIR/repr-transparent.rs:79:1 |
| 79 | +error[E0690]: transparent union needs at most one non-zero-sized field, but has 2 |
| 80 | + --> $DIR/repr-transparent.rs:85:1 |
117 | 81 | | |
118 | 82 | LL | union TooManyFields { |
119 | | - | ^^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 2 |
| 83 | + | ^^^^^^^^^^^^^^^^^^^ needs at most one non-zero-sized field, but has 2 |
120 | 84 | LL | u: u32, |
121 | 85 | | ------ this field is non-zero-sized |
122 | 86 | LL | s: i32 |
123 | 87 | | ------ this field is non-zero-sized |
124 | 88 |
|
125 | | -error: aborting due to 17 previous errors |
| 89 | +error: aborting due to 11 previous errors |
126 | 90 |
|
127 | 91 | Some errors have detailed explanations: E0084, E0690, E0691, E0731. |
128 | 92 | For more information about an error, try `rustc --explain E0084`. |
0 commit comments