2021-06-13 22:04:56 +00:00
|
|
|
error[E0690]: transparent struct needs at most one non-zero-sized field, but has 2
|
|
|
|
--> $DIR/repr-transparent.rs:26:1
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | struct MultipleNonZst(u8, u8);
|
2022-02-13 15:27:59 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ -- -- this field is non-zero-sized
|
|
|
|
| | |
|
2019-06-11 20:28:22 +00:00
|
|
|
| | this field is non-zero-sized
|
2021-06-13 22:04:56 +00:00
|
|
|
| needs at most one non-zero-sized field, but has 2
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2021-06-13 22:04:56 +00:00
|
|
|
error[E0690]: transparent struct needs at most one non-zero-sized field, but has 2
|
|
|
|
--> $DIR/repr-transparent.rs:32:1
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | pub struct StructWithProjection(f32, <f32 as Mirror>::It);
|
2022-02-13 15:27:59 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --- ------------------- this field is non-zero-sized
|
|
|
|
| | |
|
2019-06-11 20:28:22 +00:00
|
|
|
| | this field is non-zero-sized
|
2021-06-13 22:04:56 +00:00
|
|
|
| needs at most one non-zero-sized field, but has 2
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
error[E0691]: zero-sized field in transparent struct has alignment larger than 1
|
2021-06-13 22:04:56 +00:00
|
|
|
--> $DIR/repr-transparent.rs:36:32
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | struct NontrivialAlignZst(u32, [u16; 0]);
|
2019-06-11 20:28:22 +00:00
|
|
|
| ^^^^^^^^ has alignment larger than 1
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
error[E0691]: zero-sized field in transparent struct has alignment larger than 1
|
2021-06-13 22:04:56 +00:00
|
|
|
--> $DIR/repr-transparent.rs:42:24
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | struct GenericAlign<T>(ZstAlign32<T>, u32);
|
2019-06-11 20:28:22 +00:00
|
|
|
| ^^^^^^^^^^^^^ has alignment larger than 1
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2019-05-22 14:31:09 +00:00
|
|
|
error[E0084]: unsupported representation for zero-variant enum
|
2021-06-13 22:04:56 +00:00
|
|
|
--> $DIR/repr-transparent.rs:44:1
|
2019-05-22 14:31:09 +00:00
|
|
|
|
|
|
|
|
LL | #[repr(transparent)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL | enum Void {}
|
2022-07-08 01:50:10 +00:00
|
|
|
| --------- zero-variant enum
|
2019-05-22 14:31:09 +00:00
|
|
|
|
|
|
|
error[E0731]: transparent enum needs exactly one variant, but has 0
|
2021-06-13 22:04:56 +00:00
|
|
|
--> $DIR/repr-transparent.rs:45:1
|
2019-05-22 14:31:09 +00:00
|
|
|
|
|
|
|
|
LL | enum Void {}
|
2019-06-11 20:28:22 +00:00
|
|
|
| ^^^^^^^^^ needs exactly one variant, but has 0
|
2019-05-22 14:31:09 +00:00
|
|
|
|
2021-06-13 22:04:56 +00:00
|
|
|
error[E0690]: the variant of a transparent enum needs at most one non-zero-sized field, but has 2
|
|
|
|
--> $DIR/repr-transparent.rs:58:1
|
2019-05-22 14:31:09 +00:00
|
|
|
|
|
2019-06-11 20:28:22 +00:00
|
|
|
LL | enum TooManyFieldsEnum {
|
2021-06-13 22:04:56 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ needs at most one non-zero-sized field, but has 2
|
2019-05-22 14:31:09 +00:00
|
|
|
LL | Foo(u32, String),
|
2019-06-11 20:28:22 +00:00
|
|
|
| --- ------ this field is non-zero-sized
|
|
|
|
| |
|
|
|
|
| this field is non-zero-sized
|
2019-05-22 14:31:09 +00:00
|
|
|
|
|
|
|
error[E0731]: transparent enum needs exactly one variant, but has 2
|
2021-06-13 22:04:56 +00:00
|
|
|
--> $DIR/repr-transparent.rs:64:1
|
2019-05-22 14:31:09 +00:00
|
|
|
|
|
2021-06-13 22:04:56 +00:00
|
|
|
LL | enum MultipleVariants {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ needs exactly one variant, but has 2
|
2019-05-22 14:31:09 +00:00
|
|
|
LL | Foo(String),
|
2023-04-14 15:02:41 +00:00
|
|
|
| --- variant here
|
2019-05-22 14:31:09 +00:00
|
|
|
LL | Bar,
|
2021-06-13 22:04:56 +00:00
|
|
|
| --- too many variants in `MultipleVariants`
|
2019-05-22 14:31:09 +00:00
|
|
|
|
2020-01-12 15:05:18 +00:00
|
|
|
error[E0691]: zero-sized field in transparent enum has alignment larger than 1
|
2021-06-13 22:04:56 +00:00
|
|
|
--> $DIR/repr-transparent.rs:71:14
|
2020-01-12 15:05:18 +00:00
|
|
|
|
|
|
|
|
LL | Foo(u32, [u16; 0]),
|
|
|
|
| ^^^^^^^^ has alignment larger than 1
|
|
|
|
|
|
|
|
error[E0691]: zero-sized field in transparent enum has alignment larger than 1
|
2021-06-13 22:04:56 +00:00
|
|
|
--> $DIR/repr-transparent.rs:76:11
|
2020-01-12 15:05:18 +00:00
|
|
|
|
|
|
|
|
LL | Foo { bar: ZstAlign32<T>, baz: u32 }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^ has alignment larger than 1
|
|
|
|
|
2021-06-13 22:04:56 +00:00
|
|
|
error[E0690]: transparent union needs at most one non-zero-sized field, but has 2
|
|
|
|
--> $DIR/repr-transparent.rs:85:1
|
2019-05-22 14:31:09 +00:00
|
|
|
|
|
2019-06-11 20:28:22 +00:00
|
|
|
LL | union TooManyFields {
|
2021-06-13 22:04:56 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ needs at most one non-zero-sized field, but has 2
|
2019-05-22 14:31:09 +00:00
|
|
|
LL | u: u32,
|
2019-06-11 20:28:22 +00:00
|
|
|
| ------ this field is non-zero-sized
|
2019-05-22 14:31:09 +00:00
|
|
|
LL | s: i32
|
2019-06-11 20:28:22 +00:00
|
|
|
| ------ this field is non-zero-sized
|
2019-05-22 14:31:09 +00:00
|
|
|
|
2021-06-13 22:04:56 +00:00
|
|
|
error: aborting due to 11 previous errors
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2019-05-22 14:31:09 +00:00
|
|
|
Some errors have detailed explanations: E0084, E0690, E0691, E0731.
|
|
|
|
For more information about an error, try `rustc --explain E0084`.
|