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
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
2
+
--> $DIR/repr-transparent-repr-c.rs:18:22
3
+
|
4
+
LL | pub struct T5(Sized, ReprC1Zst);
5
+
| ^^^^^^^^^
6
+
|
7
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8
+
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
9
+
= note: this struct contains `ReprC1Zst`, which is marked with `#[repr(C)]`, and makes it not a breaking change to become non-zero-sized in the future.
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
17
+
--> $DIR/repr-transparent-repr-c.rs:23:15
18
+
|
19
+
LL | pub struct T6(ReprC1Zst, Sized);
20
+
| ^^^^^^^^^
21
+
|
22
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
23
+
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
24
+
= note: this struct contains `ReprC1Zst`, which is marked with `#[repr(C)]`, and makes it not a breaking change to become non-zero-sized in the future.
25
+
26
+
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
27
+
--> $DIR/repr-transparent-repr-c.rs:28:15
28
+
|
29
+
LL | pub struct T7(T1, Sized); // still wrong, even when the repr(C) is hidden inside another type
30
+
| ^^
31
+
|
32
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
33
+
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
34
+
= note: this struct contains `ReprC1Zst`, which is marked with `#[repr(C)]`, and makes it not a breaking change to become non-zero-sized in the future.
0 commit comments