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
|
|
|
|
|
|
|
|
LL | struct NoFields; //~ ERROR needs exactly one non-zero-sized field
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: non-zero-sized field
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
LL | struct ContainsOnlyZst(()); //~ ERROR needs exactly one non-zero-sized field
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: non-zero-sized field
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
LL | struct ContainsOnlyZstArray([bool; 0]); //~ ERROR needs exactly one non-zero-sized field
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: non-zero-sized field
|
|
|
|
|
|
|
|
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);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: non-zero-sized field
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
LL | struct MultipleNonZst(u8, u8); //~ ERROR needs exactly one non-zero-sized field
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: non-zero-sized field
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/repr-transparent.rs:24:23
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | struct MultipleNonZst(u8, u8); //~ ERROR needs exactly one non-zero-sized field
|
|
|
|
| ^^ ^^
|
|
|
|
|
|
|
|
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);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: non-zero-sized field
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/repr-transparent.rs:30:33
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | pub struct StructWithProjection(f32, <f32 as Mirror>::It);
|
|
|
|
| ^^^ ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
LL | struct NontrivialAlignZst(u32, [u16; 0]); //~ ERROR alignment larger than 1
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
LL | struct GenericAlign<T>(ZstAlign32<T>, u32); //~ ERROR alignment larger than 1
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
2018-08-22 18:19:38 -05:00
|
|
|
error: aborting due to 8 previous errors
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2018-08-22 18:19:38 -05:00
|
|
|
Some errors occurred: E0690, E0691.
|
|
|
|
For more information about an error, try `rustc --explain E0690`.
|