2018-08-08 07:28:26 -05:00
|
|
|
error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/repr-transparent.rs:11:1
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | struct NoFields;
|
2019-06-11 15:28:22 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/repr-transparent.rs:14:1
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | struct ContainsOnlyZst(());
|
2019-06-11 15:28:22 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/repr-transparent.rs:17:1
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | struct ContainsOnlyZstArray([bool; 0]);
|
2019-06-11 15:28:22 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/repr-transparent.rs:20:1
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | struct ContainsMultipleZst(PhantomData<*const i32>, NoFields);
|
2019-06-11 15:28:22 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 2
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/repr-transparent.rs:24:1
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | struct MultipleNonZst(u8, u8);
|
2019-06-11 15:28:22 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^--^^--^^
|
|
|
|
| | | |
|
|
|
|
| | | this field is non-zero-sized
|
|
|
|
| | this field is non-zero-sized
|
|
|
|
| needs exactly one non-zero-sized field, but has 2
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 2
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/repr-transparent.rs:30:1
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | pub struct StructWithProjection(f32, <f32 as Mirror>::It);
|
2019-06-11 15:28:22 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---^^-------------------^^
|
|
|
|
| | | |
|
|
|
|
| | | this field is non-zero-sized
|
|
|
|
| | this field is non-zero-sized
|
|
|
|
| needs exactly one non-zero-sized field, but has 2
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0691]: zero-sized field in transparent struct has alignment larger than 1
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/repr-transparent.rs:34:32
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | struct NontrivialAlignZst(u32, [u16; 0]);
|
2019-06-11 15:28:22 -05:00
|
|
|
| ^^^^^^^^ has alignment larger than 1
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0691]: zero-sized field in transparent struct has alignment larger than 1
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/repr-transparent.rs:40:24
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | struct GenericAlign<T>(ZstAlign32<T>, u32);
|
2019-06-11 15:28:22 -05:00
|
|
|
| ^^^^^^^^^^^^^ has alignment larger than 1
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-05-22 09:31:09 -05:00
|
|
|
error[E0084]: unsupported representation for zero-variant enum
|
|
|
|
--> $DIR/repr-transparent.rs:42:1
|
|
|
|
|
|
|
|
|
LL | #[repr(transparent)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL | enum Void {}
|
|
|
|
| ------------ zero-variant enum
|
|
|
|
|
|
|
|
error[E0731]: transparent enum needs exactly one variant, but has 0
|
|
|
|
--> $DIR/repr-transparent.rs:43:1
|
|
|
|
|
|
|
|
|
LL | enum Void {}
|
2019-06-11 15:28:22 -05:00
|
|
|
| ^^^^^^^^^ needs exactly one variant, but has 0
|
2019-05-22 09:31:09 -05:00
|
|
|
|
|
|
|
error[E0690]: the variant of a transparent enum needs exactly one non-zero-sized field, but has 0
|
|
|
|
--> $DIR/repr-transparent.rs:47:1
|
|
|
|
|
|
2019-06-11 15:28:22 -05:00
|
|
|
LL | enum FieldlessEnum {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0
|
2019-05-22 09:31:09 -05:00
|
|
|
|
|
|
|
error[E0690]: the variant of a transparent enum needs exactly one non-zero-sized field, but has 2
|
|
|
|
--> $DIR/repr-transparent.rs:52:1
|
|
|
|
|
|
2019-06-11 15:28:22 -05:00
|
|
|
LL | enum TooManyFieldsEnum {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 2
|
2019-05-22 09:31:09 -05:00
|
|
|
LL | Foo(u32, String),
|
2019-06-11 15:28:22 -05:00
|
|
|
| --- ------ this field is non-zero-sized
|
|
|
|
| |
|
|
|
|
| this field is non-zero-sized
|
2019-05-22 09:31:09 -05:00
|
|
|
|
|
|
|
error[E0731]: transparent enum needs exactly one variant, but has 2
|
|
|
|
--> $DIR/repr-transparent.rs:58:1
|
|
|
|
|
|
2019-06-11 15:28:22 -05:00
|
|
|
LL | enum TooManyVariants {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ needs exactly one variant, but has 2
|
2019-05-22 09:31:09 -05:00
|
|
|
LL | Foo(String),
|
2019-06-11 15:28:22 -05:00
|
|
|
| -----------
|
2019-05-22 09:31:09 -05:00
|
|
|
LL | Bar,
|
2019-06-11 15:28:22 -05:00
|
|
|
| --- too many variants in `TooManyVariants`
|
2019-05-22 09:31:09 -05:00
|
|
|
|
|
|
|
error[E0690]: transparent union needs exactly one non-zero-sized field, but has 0
|
|
|
|
--> $DIR/repr-transparent.rs:64:1
|
|
|
|
|
|
2019-06-11 15:28:22 -05:00
|
|
|
LL | union UnitUnion {
|
|
|
|
| ^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0
|
2019-05-22 09:31:09 -05:00
|
|
|
|
|
|
|
error[E0690]: transparent union needs exactly one non-zero-sized field, but has 2
|
|
|
|
--> $DIR/repr-transparent.rs:69:1
|
|
|
|
|
|
2019-06-11 15:28:22 -05:00
|
|
|
LL | union TooManyFields {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 2
|
2019-05-22 09:31:09 -05:00
|
|
|
LL | u: u32,
|
2019-06-11 15:28:22 -05:00
|
|
|
| ------ this field is non-zero-sized
|
2019-05-22 09:31:09 -05:00
|
|
|
LL | s: i32
|
2019-06-11 15:28:22 -05:00
|
|
|
| ------ this field is non-zero-sized
|
2019-05-22 09:31:09 -05:00
|
|
|
|
|
|
|
error: aborting due to 15 previous errors
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-05-22 09:31:09 -05:00
|
|
|
Some errors have detailed explanations: E0084, E0690, E0691, E0731.
|
|
|
|
For more information about an error, try `rustc --explain E0084`.
|