1 error[E0690]: transparent struct needs at most one non-zero-sized field, but has 2
2 --> $DIR/repr-transparent.rs:26:1
4 LL | struct MultipleNonZst(u8, u8);
5 | ^^^^^^^^^^^^^^^^^^^^^ -- -- this field is non-zero-sized
7 | | this field is non-zero-sized
8 | needs at most one non-zero-sized field, but has 2
10 error[E0690]: transparent struct needs at most one non-zero-sized field, but has 2
11 --> $DIR/repr-transparent.rs:32:1
13 LL | pub struct StructWithProjection(f32, <f32 as Mirror>::It);
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --- ------------------- this field is non-zero-sized
16 | | this field is non-zero-sized
17 | needs at most one non-zero-sized field, but has 2
19 error[E0691]: zero-sized field in transparent struct has alignment larger than 1
20 --> $DIR/repr-transparent.rs:36:32
22 LL | struct NontrivialAlignZst(u32, [u16; 0]);
23 | ^^^^^^^^ has alignment larger than 1
25 error[E0691]: zero-sized field in transparent struct has alignment larger than 1
26 --> $DIR/repr-transparent.rs:42:24
28 LL | struct GenericAlign<T>(ZstAlign32<T>, u32);
29 | ^^^^^^^^^^^^^ has alignment larger than 1
31 error[E0084]: unsupported representation for zero-variant enum
32 --> $DIR/repr-transparent.rs:44:1
34 LL | #[repr(transparent)]
35 | ^^^^^^^^^^^^^^^^^^^^
37 | --------- zero-variant enum
39 error[E0731]: transparent enum needs exactly one variant, but has 0
40 --> $DIR/repr-transparent.rs:45:1
43 | ^^^^^^^^^ needs exactly one variant, but has 0
45 error[E0690]: the variant of a transparent enum needs at most one non-zero-sized field, but has 2
46 --> $DIR/repr-transparent.rs:58:1
48 LL | enum TooManyFieldsEnum {
49 | ^^^^^^^^^^^^^^^^^^^^^^ needs at most one non-zero-sized field, but has 2
50 LL | Foo(u32, String),
51 | --- ------ this field is non-zero-sized
53 | this field is non-zero-sized
55 error[E0731]: transparent enum needs exactly one variant, but has 2
56 --> $DIR/repr-transparent.rs:64:1
58 LL | enum MultipleVariants {
59 | ^^^^^^^^^^^^^^^^^^^^^ needs exactly one variant, but has 2
63 | --- too many variants in `MultipleVariants`
65 error[E0691]: zero-sized field in transparent enum has alignment larger than 1
66 --> $DIR/repr-transparent.rs:71:14
68 LL | Foo(u32, [u16; 0]),
69 | ^^^^^^^^ has alignment larger than 1
71 error[E0691]: zero-sized field in transparent enum has alignment larger than 1
72 --> $DIR/repr-transparent.rs:76:11
74 LL | Foo { bar: ZstAlign32<T>, baz: u32 }
75 | ^^^^^^^^^^^^^^^^^^ has alignment larger than 1
77 error[E0690]: transparent union needs at most one non-zero-sized field, but has 2
78 --> $DIR/repr-transparent.rs:85:1
80 LL | union TooManyFields {
81 | ^^^^^^^^^^^^^^^^^^^ needs at most one non-zero-sized field, but has 2
83 | ------ this field is non-zero-sized
85 | ------ this field is non-zero-sized
87 error: aborting due to 11 previous errors
89 Some errors have detailed explanations: E0084, E0690, E0691, E0731.
90 For more information about an error, try `rustc --explain E0084`.