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 | ^^^^^^^^^^^^^^^^^^^^^^--^^--^^
7 | | | this field is non-zero-sized
8 | | this field is non-zero-sized
9 | needs at most one non-zero-sized field, but has 2
11 error[E0690]: transparent struct needs at most one non-zero-sized field, but has 2
12 --> $DIR/repr-transparent.rs:32:1
14 LL | pub struct StructWithProjection(f32, <f32 as Mirror>::It);
15 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---^^-------------------^^
17 | | | this field is non-zero-sized
18 | | this field is non-zero-sized
19 | needs at most one non-zero-sized field, but has 2
21 error[E0691]: zero-sized field in transparent struct has alignment larger than 1
22 --> $DIR/repr-transparent.rs:36:32
24 LL | struct NontrivialAlignZst(u32, [u16; 0]);
25 | ^^^^^^^^ has alignment larger than 1
27 error[E0691]: zero-sized field in transparent struct has alignment larger than 1
28 --> $DIR/repr-transparent.rs:42:24
30 LL | struct GenericAlign<T>(ZstAlign32<T>, u32);
31 | ^^^^^^^^^^^^^ has alignment larger than 1
33 error[E0084]: unsupported representation for zero-variant enum
34 --> $DIR/repr-transparent.rs:44:1
36 LL | #[repr(transparent)]
37 | ^^^^^^^^^^^^^^^^^^^^
39 | ------------ zero-variant enum
41 error[E0731]: transparent enum needs exactly one variant, but has 0
42 --> $DIR/repr-transparent.rs:45:1
45 | ^^^^^^^^^ needs exactly one variant, but has 0
47 error[E0690]: the variant of a transparent enum needs at most one non-zero-sized field, but has 2
48 --> $DIR/repr-transparent.rs:58:1
50 LL | enum TooManyFieldsEnum {
51 | ^^^^^^^^^^^^^^^^^^^^^^ needs at most one non-zero-sized field, but has 2
52 LL | Foo(u32, String),
53 | --- ------ this field is non-zero-sized
55 | this field is non-zero-sized
57 error[E0731]: transparent enum needs exactly one variant, but has 2
58 --> $DIR/repr-transparent.rs:64:1
60 LL | enum MultipleVariants {
61 | ^^^^^^^^^^^^^^^^^^^^^ needs exactly one variant, but has 2
65 | --- too many variants in `MultipleVariants`
67 error[E0691]: zero-sized field in transparent enum has alignment larger than 1
68 --> $DIR/repr-transparent.rs:71:14
70 LL | Foo(u32, [u16; 0]),
71 | ^^^^^^^^ has alignment larger than 1
73 error[E0691]: zero-sized field in transparent enum has alignment larger than 1
74 --> $DIR/repr-transparent.rs:76:11
76 LL | Foo { bar: ZstAlign32<T>, baz: u32 }
77 | ^^^^^^^^^^^^^^^^^^ has alignment larger than 1
79 error[E0690]: transparent union needs at most one non-zero-sized field, but has 2
80 --> $DIR/repr-transparent.rs:85:1
82 LL | union TooManyFields {
83 | ^^^^^^^^^^^^^^^^^^^ needs at most one non-zero-sized field, but has 2
85 | ------ this field is non-zero-sized
87 | ------ this field is non-zero-sized
89 error: aborting due to 11 previous errors
91 Some errors have detailed explanations: E0084, E0690, E0691, E0731.
92 For more information about an error, try `rustc --explain E0084`.