You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
54
54
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
55
55
56
-
error: aborting due to 5 previous errors
56
+
error: zero-sized fields in `repr(transparent)` cannot contain `repr(C)` types
57
+
--> $DIR/repr-transparent-array.rs:53:23
58
+
|
59
+
LL | pub struct T10(Sized, CPacked1Arr<u128>);
60
+
| ^^^^^^^^^^^^^^^^^
61
+
|
62
+
= note: this field contains `CPacked1Arr<u128>`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
63
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
64
+
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
65
+
66
+
error: zero-sized fields in `repr(transparent)` cannot contain array types with non-trivial element types
67
+
--> $DIR/repr-transparent-array.rs:58:23
68
+
|
69
+
LL | pub struct T11(Sized, RustPacked2Arr);
70
+
| ^^^^^^^^^^^^^^
71
+
|
72
+
= note: this field contains `[u8; 0]`, which is an array with a non-trivial element type, so it is not guaranteed to have a trivial ABI in all situations.
73
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
74
+
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
@@ -135,3 +155,35 @@ note: the lint level is defined here
135
155
LL | #![deny(repr_transparent_non_zst_fields)]
136
156
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
137
157
158
+
Future breakage diagnostic:
159
+
error: zero-sized fields in `repr(transparent)` cannot contain `repr(C)` types
160
+
--> $DIR/repr-transparent-array.rs:53:23
161
+
|
162
+
LL | pub struct T10(Sized, CPacked1Arr<u128>);
163
+
| ^^^^^^^^^^^^^^^^^
164
+
|
165
+
= note: this field contains `CPacked1Arr<u128>`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
166
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
167
+
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
168
+
note: the lint level is defined here
169
+
--> $DIR/repr-transparent-array.rs:1:9
170
+
|
171
+
LL | #![deny(repr_transparent_non_zst_fields)]
172
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
173
+
174
+
Future breakage diagnostic:
175
+
error: zero-sized fields in `repr(transparent)` cannot contain array types with non-trivial element types
176
+
--> $DIR/repr-transparent-array.rs:58:23
177
+
|
178
+
LL | pub struct T11(Sized, RustPacked2Arr);
179
+
| ^^^^^^^^^^^^^^
180
+
|
181
+
= note: this field contains `[u8; 0]`, which is an array with a non-trivial element type, so it is not guaranteed to have a trivial ABI in all situations.
182
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
183
+
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
0 commit comments