blob: 5724845afdc1e78b46dcc0b2f07a9e23d7c5febd [file] [log] [blame] [edit]
error: zero-sized fields in `repr(transparent)` cannot contain `repr(C)` types
--> $DIR/repr-transparent-repr-c.rs:18:22
|
LL | pub struct T5(Sized, ReprC1Zst);
| ^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `ReprC1Zst`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
note: the lint level is defined here
--> $DIR/repr-transparent-repr-c.rs:1:9
|
LL | #![deny(repr_transparent_non_zst_fields)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: zero-sized fields in `repr(transparent)` cannot contain `repr(C)` types
--> $DIR/repr-transparent-repr-c.rs:23:15
|
LL | pub struct T6(ReprC1Zst, Sized);
| ^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `ReprC1Zst`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
error: zero-sized fields in `repr(transparent)` cannot contain `repr(C)` types
--> $DIR/repr-transparent-repr-c.rs:28:15
|
LL | pub struct T7(T1, Sized); // still wrong, even when the repr(C) is hidden inside another type
| ^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `ReprC1Zst`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
error: aborting due to 3 previous errors
Future incompatibility report: Future breakage diagnostic:
error: zero-sized fields in `repr(transparent)` cannot contain `repr(C)` types
--> $DIR/repr-transparent-repr-c.rs:18:22
|
LL | pub struct T5(Sized, ReprC1Zst);
| ^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `ReprC1Zst`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
note: the lint level is defined here
--> $DIR/repr-transparent-repr-c.rs:1:9
|
LL | #![deny(repr_transparent_non_zst_fields)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: zero-sized fields in `repr(transparent)` cannot contain `repr(C)` types
--> $DIR/repr-transparent-repr-c.rs:23:15
|
LL | pub struct T6(ReprC1Zst, Sized);
| ^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `ReprC1Zst`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
note: the lint level is defined here
--> $DIR/repr-transparent-repr-c.rs:1:9
|
LL | #![deny(repr_transparent_non_zst_fields)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Future breakage diagnostic:
error: zero-sized fields in `repr(transparent)` cannot contain `repr(C)` types
--> $DIR/repr-transparent-repr-c.rs:28:15
|
LL | pub struct T7(T1, Sized); // still wrong, even when the repr(C) is hidden inside another type
| ^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
= note: this field contains `ReprC1Zst`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
note: the lint level is defined here
--> $DIR/repr-transparent-repr-c.rs:1:9
|
LL | #![deny(repr_transparent_non_zst_fields)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^