]> git.proxmox.com Git - rustc.git/blob - src/test/ui/repr/repr-transparent.stderr
New upstream version 1.35.0+dfsg1
[rustc.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:11:1
3 |
4 LL | struct NoFields;
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:14:1
11 |
12 LL | struct ContainsOnlyZst(());
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:17:1
19 |
20 LL | struct ContainsOnlyZstArray([bool; 0]);
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:20: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:24:1
35 |
36 LL | struct MultipleNonZst(u8, u8);
37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38 |
39 note: non-zero-sized field
40 --> $DIR/repr-transparent.rs:24:23
41 |
42 LL | struct MultipleNonZst(u8, u8);
43 | ^^ ^^
44
45 error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 2
46 --> $DIR/repr-transparent.rs:30: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:30: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:34:32
59 |
60 LL | struct NontrivialAlignZst(u32, [u16; 0]);
61 | ^^^^^^^^
62
63 error[E0691]: zero-sized field in transparent struct has alignment larger than 1
64 --> $DIR/repr-transparent.rs:40:24
65 |
66 LL | struct GenericAlign<T>(ZstAlign32<T>, u32);
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`.