fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0 2 --> $DIR/repr-transparent.rs:11:1 3 | 4LL | struct NoFields; 5 | ^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0 6 7error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0 8 --> $DIR/repr-transparent.rs:14:1 9 | 10LL | struct ContainsOnlyZst(()); 11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0 12 13error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0 14 --> $DIR/repr-transparent.rs:17:1 15 | 16LL | struct ContainsOnlyZstArray([bool; 0]); 17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0 18 19error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0 20 --> $DIR/repr-transparent.rs:20:1 21 | 22LL | struct ContainsMultipleZst(PhantomData<*const i32>, NoFields); 23 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0 24 25error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 2 26 --> $DIR/repr-transparent.rs:24:1 27 | 28LL | struct MultipleNonZst(u8, u8); 29 | ^^^^^^^^^^^^^^^^^^^^^^--^^--^^ 30 | | | | 31 | | | this field is non-zero-sized 32 | | this field is non-zero-sized 33 | needs exactly one non-zero-sized field, but has 2 34 35error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 2 36 --> $DIR/repr-transparent.rs:30:1 37 | 38LL | pub struct StructWithProjection(f32, <f32 as Mirror>::It); 39 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---^^-------------------^^ 40 | | | | 41 | | | this field is non-zero-sized 42 | | this field is non-zero-sized 43 | needs exactly one non-zero-sized field, but has 2 44 45error[E0691]: zero-sized field in transparent struct has alignment larger than 1 46 --> $DIR/repr-transparent.rs:34:32 47 | 48LL | struct NontrivialAlignZst(u32, [u16; 0]); 49 | ^^^^^^^^ has alignment larger than 1 50 51error[E0691]: zero-sized field in transparent struct has alignment larger than 1 52 --> $DIR/repr-transparent.rs:40:24 53 | 54LL | struct GenericAlign<T>(ZstAlign32<T>, u32); 55 | ^^^^^^^^^^^^^ has alignment larger than 1 56 57error[E0084]: unsupported representation for zero-variant enum 58 --> $DIR/repr-transparent.rs:42:1 59 | 60LL | #[repr(transparent)] 61 | ^^^^^^^^^^^^^^^^^^^^ 62LL | enum Void {} 63 | ------------ zero-variant enum 64 65error[E0731]: transparent enum needs exactly one variant, but has 0 66 --> $DIR/repr-transparent.rs:43:1 67 | 68LL | enum Void {} 69 | ^^^^^^^^^ needs exactly one variant, but has 0 70 71error[E0690]: the variant of a transparent enum needs exactly one non-zero-sized field, but has 0 72 --> $DIR/repr-transparent.rs:47:1 73 | 74LL | enum FieldlessEnum { 75 | ^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0 76 77error[E0690]: the variant of a transparent enum needs exactly one non-zero-sized field, but has 2 78 --> $DIR/repr-transparent.rs:52:1 79 | 80LL | enum TooManyFieldsEnum { 81 | ^^^^^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 2 82LL | Foo(u32, String), 83 | --- ------ this field is non-zero-sized 84 | | 85 | this field is non-zero-sized 86 87error[E0731]: transparent enum needs exactly one variant, but has 2 88 --> $DIR/repr-transparent.rs:58:1 89 | 90LL | enum TooManyVariants { 91 | ^^^^^^^^^^^^^^^^^^^^ needs exactly one variant, but has 2 92LL | Foo(String), 93 | ----------- 94LL | Bar, 95 | --- too many variants in `TooManyVariants` 96 97error[E0691]: zero-sized field in transparent enum has alignment larger than 1 98 --> $DIR/repr-transparent.rs:65:14 99 | 100LL | Foo(u32, [u16; 0]), 101 | ^^^^^^^^ has alignment larger than 1 102 103error[E0691]: zero-sized field in transparent enum has alignment larger than 1 104 --> $DIR/repr-transparent.rs:70:11 105 | 106LL | Foo { bar: ZstAlign32<T>, baz: u32 } 107 | ^^^^^^^^^^^^^^^^^^ has alignment larger than 1 108 109error[E0690]: transparent union needs exactly one non-zero-sized field, but has 0 110 --> $DIR/repr-transparent.rs:74:1 111 | 112LL | union UnitUnion { 113 | ^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0 114 115error[E0690]: transparent union needs exactly one non-zero-sized field, but has 2 116 --> $DIR/repr-transparent.rs:79:1 117 | 118LL | union TooManyFields { 119 | ^^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 2 120LL | u: u32, 121 | ------ this field is non-zero-sized 122LL | s: i32 123 | ------ this field is non-zero-sized 124 125error: aborting due to 17 previous errors 126 127Some errors have detailed explanations: E0084, E0690, E0691, E0731. 128For more information about an error, try `rustc --explain E0084`.