error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0 --> $DIR/repr-transparent.rs:11:1 | LL | struct NoFields; | ^^^^^^^^^^^^^^^^ error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0 --> $DIR/repr-transparent.rs:14:1 | LL | struct ContainsOnlyZst(()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0 --> $DIR/repr-transparent.rs:17:1 | LL | struct ContainsOnlyZstArray([bool; 0]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0 --> $DIR/repr-transparent.rs:20:1 | LL | struct ContainsMultipleZst(PhantomData<*const i32>, NoFields); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 2 --> $DIR/repr-transparent.rs:24:1 | LL | struct MultipleNonZst(u8, u8); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: the following non-zero-sized fields exist on `MultipleNonZst`: --> $DIR/repr-transparent.rs:24:23 | LL | struct MultipleNonZst(u8, u8); | ^^ ^^ error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 2 --> $DIR/repr-transparent.rs:30:1 | LL | pub struct StructWithProjection(f32, ::It); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: the following non-zero-sized fields exist on `StructWithProjection`: --> $DIR/repr-transparent.rs:30:33 | LL | pub struct StructWithProjection(f32, ::It); | ^^^ ^^^^^^^^^^^^^^^^^^^ error[E0691]: zero-sized field in transparent struct has alignment larger than 1 --> $DIR/repr-transparent.rs:34:32 | LL | struct NontrivialAlignZst(u32, [u16; 0]); | ^^^^^^^^ error[E0691]: zero-sized field in transparent struct has alignment larger than 1 --> $DIR/repr-transparent.rs:40:24 | LL | struct GenericAlign(ZstAlign32, u32); | ^^^^^^^^^^^^^ error[E0084]: unsupported representation for zero-variant enum --> $DIR/repr-transparent.rs:42:1 | LL | #[repr(transparent)] | ^^^^^^^^^^^^^^^^^^^^ LL | enum Void {} | ------------ zero-variant enum error[E0731]: transparent enum needs exactly one variant, but has 0 --> $DIR/repr-transparent.rs:43:1 | LL | enum Void {} | ^^^^^^^^^^^^ error[E0690]: the variant of a transparent enum needs exactly one non-zero-sized field, but has 0 --> $DIR/repr-transparent.rs:47:1 | LL | / enum FieldlessEnum { LL | | Foo, LL | | } | |_^ error[E0690]: the variant of a transparent enum needs exactly one non-zero-sized field, but has 2 --> $DIR/repr-transparent.rs:52:1 | LL | / enum TooManyFieldsEnum { LL | | Foo(u32, String), LL | | } | |_^ | note: the following non-zero-sized fields exist on `TooManyFieldsEnum`: --> $DIR/repr-transparent.rs:53:9 | LL | Foo(u32, String), | ^^^ ^^^^^^ error[E0731]: transparent enum needs exactly one variant, but has 2 --> $DIR/repr-transparent.rs:58:1 | LL | / enum TooManyVariants { LL | | Foo(String), LL | | Bar, LL | | } | |_^ | note: the following variants exist on `TooManyVariants` --> $DIR/repr-transparent.rs:59:5 | LL | Foo(String), | ^^^^^^^^^^^ LL | Bar, | ^^^ error[E0690]: transparent union needs exactly one non-zero-sized field, but has 0 --> $DIR/repr-transparent.rs:64:1 | LL | / union UnitUnion { LL | | u: (), LL | | } | |_^ error[E0690]: transparent union needs exactly one non-zero-sized field, but has 2 --> $DIR/repr-transparent.rs:69:1 | LL | / union TooManyFields { LL | | u: u32, LL | | s: i32 LL | | } | |_^ | note: the following non-zero-sized fields exist on `TooManyFields`: --> $DIR/repr-transparent.rs:70:5 | LL | u: u32, | ^^^^^^ LL | s: i32 | ^^^^^^ error: aborting due to 15 previous errors Some errors have detailed explanations: E0084, E0690, E0691, E0731. For more information about an error, try `rustc --explain E0084`.