1 error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0
2 --> $DIR/repr-transparent.rs:11:1
7 = note: non-zero-sized field
9 error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0
10 --> $DIR/repr-transparent.rs:14:1
12 LL | struct ContainsOnlyZst(());
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 = note: non-zero-sized field
17 error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0
18 --> $DIR/repr-transparent.rs:17:1
20 LL | struct ContainsOnlyZstArray([bool; 0]);
21 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23 = note: non-zero-sized field
25 error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0
26 --> $DIR/repr-transparent.rs:20:1
28 LL | struct ContainsMultipleZst(PhantomData<*const i32>, NoFields);
29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31 = note: non-zero-sized field
33 error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 2
34 --> $DIR/repr-transparent.rs:24:1
36 LL | struct MultipleNonZst(u8, u8);
37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39 note: non-zero-sized field
40 --> $DIR/repr-transparent.rs:24:23
42 LL | struct MultipleNonZst(u8, u8);
45 error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 2
46 --> $DIR/repr-transparent.rs:30:1
48 LL | pub struct StructWithProjection(f32, <f32 as Mirror>::It);
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
51 note: non-zero-sized field
52 --> $DIR/repr-transparent.rs:30:33
54 LL | pub struct StructWithProjection(f32, <f32 as Mirror>::It);
55 | ^^^ ^^^^^^^^^^^^^^^^^^^
57 error[E0691]: zero-sized field in transparent struct has alignment larger than 1
58 --> $DIR/repr-transparent.rs:34:32
60 LL | struct NontrivialAlignZst(u32, [u16; 0]);
63 error[E0691]: zero-sized field in transparent struct has alignment larger than 1
64 --> $DIR/repr-transparent.rs:40:24
66 LL | struct GenericAlign<T>(ZstAlign32<T>, u32);
69 error: aborting due to 8 previous errors
71 Some errors occurred: E0690, E0691.
72 For more information about an error, try `rustc --explain E0690`.