]> git.lizzy.rs Git - rust.git/blob - src/test/ui/repr/repr-transparent.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / repr / repr-transparent.stderr
1 error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0
2   --> $DIR/repr-transparent.rs:21:1
3    |
4 LL | struct NoFields; //~ ERROR needs exactly one non-zero-sized field
5    | ^^^^^^^^^^^^^^^^
6    |
7    = note: non-zero-sized field
8
9 error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0
10   --> $DIR/repr-transparent.rs:24:1
11    |
12 LL | struct ContainsOnlyZst(()); //~ ERROR needs exactly one non-zero-sized field
13    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
14    |
15    = note: non-zero-sized field
16
17 error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0
18   --> $DIR/repr-transparent.rs:27:1
19    |
20 LL | struct ContainsOnlyZstArray([bool; 0]); //~ ERROR needs exactly one non-zero-sized field
21    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22    |
23    = note: non-zero-sized field
24
25 error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0
26   --> $DIR/repr-transparent.rs:30:1
27    |
28 LL | struct ContainsMultipleZst(PhantomData<*const i32>, NoFields);
29    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30    |
31    = note: non-zero-sized field
32
33 error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 2
34   --> $DIR/repr-transparent.rs:34:1
35    |
36 LL | struct MultipleNonZst(u8, u8); //~ ERROR needs exactly one non-zero-sized field
37    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38    |
39 note: non-zero-sized field
40   --> $DIR/repr-transparent.rs:34:23
41    |
42 LL | struct MultipleNonZst(u8, u8); //~ ERROR needs exactly one non-zero-sized field
43    |                       ^^  ^^
44
45 error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 2
46   --> $DIR/repr-transparent.rs:40:1
47    |
48 LL | pub struct StructWithProjection(f32, <f32 as Mirror>::It);
49    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50    |
51 note: non-zero-sized field
52   --> $DIR/repr-transparent.rs:40:33
53    |
54 LL | pub struct StructWithProjection(f32, <f32 as Mirror>::It);
55    |                                 ^^^  ^^^^^^^^^^^^^^^^^^^
56
57 error[E0691]: zero-sized field in transparent struct has alignment larger than 1
58   --> $DIR/repr-transparent.rs:44:32
59    |
60 LL | struct NontrivialAlignZst(u32, [u16; 0]); //~ ERROR alignment larger than 1
61    |                                ^^^^^^^^
62
63 error[E0691]: zero-sized field in transparent struct has alignment larger than 1
64   --> $DIR/repr-transparent.rs:50:24
65    |
66 LL | struct GenericAlign<T>(ZstAlign32<T>, u32); //~ ERROR alignment larger than 1
67    |                        ^^^^^^^^^^^^^
68
69 error: aborting due to 8 previous errors
70
71 Some errors occurred: E0690, E0691.
72 For more information about an error, try `rustc --explain E0690`.