]> git.lizzy.rs Git - rust.git/blob - src/test/ui/repr/repr-transparent.stderr
Rollup merge of #94577 - RalfJung:simd-miri, r=scottmcm
[rust.git] / src / test / ui / repr / repr-transparent.stderr
1 error[E0690]: transparent struct needs at most one non-zero-sized field, but has 2
2   --> $DIR/repr-transparent.rs:26:1
3    |
4 LL | struct MultipleNonZst(u8, u8);
5    | ^^^^^^^^^^^^^^^^^^^^^^--^^--^^
6    | |                     |   |
7    | |                     |   this field is non-zero-sized
8    | |                     this field is non-zero-sized
9    | needs at most one non-zero-sized field, but has 2
10
11 error[E0690]: transparent struct needs at most one non-zero-sized field, but has 2
12   --> $DIR/repr-transparent.rs:32:1
13    |
14 LL | pub struct StructWithProjection(f32, <f32 as Mirror>::It);
15    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---^^-------------------^^
16    | |                               |    |
17    | |                               |    this field is non-zero-sized
18    | |                               this field is non-zero-sized
19    | needs at most one non-zero-sized field, but has 2
20
21 error[E0691]: zero-sized field in transparent struct has alignment larger than 1
22   --> $DIR/repr-transparent.rs:36:32
23    |
24 LL | struct NontrivialAlignZst(u32, [u16; 0]);
25    |                                ^^^^^^^^ has alignment larger than 1
26
27 error[E0691]: zero-sized field in transparent struct has alignment larger than 1
28   --> $DIR/repr-transparent.rs:42:24
29    |
30 LL | struct GenericAlign<T>(ZstAlign32<T>, u32);
31    |                        ^^^^^^^^^^^^^ has alignment larger than 1
32
33 error[E0084]: unsupported representation for zero-variant enum
34   --> $DIR/repr-transparent.rs:44:1
35    |
36 LL | #[repr(transparent)]
37    | ^^^^^^^^^^^^^^^^^^^^
38 LL | enum Void {}
39    | ------------ zero-variant enum
40
41 error[E0731]: transparent enum needs exactly one variant, but has 0
42   --> $DIR/repr-transparent.rs:45:1
43    |
44 LL | enum Void {}
45    | ^^^^^^^^^ needs exactly one variant, but has 0
46
47 error[E0690]: the variant of a transparent enum needs at most one non-zero-sized field, but has 2
48   --> $DIR/repr-transparent.rs:58:1
49    |
50 LL | enum TooManyFieldsEnum {
51    | ^^^^^^^^^^^^^^^^^^^^^^ needs at most one non-zero-sized field, but has 2
52 LL |     Foo(u32, String),
53    |         ---  ------ this field is non-zero-sized
54    |         |
55    |         this field is non-zero-sized
56
57 error[E0731]: transparent enum needs exactly one variant, but has 2
58   --> $DIR/repr-transparent.rs:64:1
59    |
60 LL | enum MultipleVariants {
61    | ^^^^^^^^^^^^^^^^^^^^^ needs exactly one variant, but has 2
62 LL |     Foo(String),
63    |     -----------
64 LL |     Bar,
65    |     --- too many variants in `MultipleVariants`
66
67 error[E0691]: zero-sized field in transparent enum has alignment larger than 1
68   --> $DIR/repr-transparent.rs:71:14
69    |
70 LL |     Foo(u32, [u16; 0]),
71    |              ^^^^^^^^ has alignment larger than 1
72
73 error[E0691]: zero-sized field in transparent enum has alignment larger than 1
74   --> $DIR/repr-transparent.rs:76:11
75    |
76 LL |     Foo { bar: ZstAlign32<T>, baz: u32 }
77    |           ^^^^^^^^^^^^^^^^^^ has alignment larger than 1
78
79 error[E0690]: transparent union needs at most one non-zero-sized field, but has 2
80   --> $DIR/repr-transparent.rs:85:1
81    |
82 LL | union TooManyFields {
83    | ^^^^^^^^^^^^^^^^^^^ needs at most one non-zero-sized field, but has 2
84 LL |     u: u32,
85    |     ------ this field is non-zero-sized
86 LL |     s: i32
87    |     ------ this field is non-zero-sized
88
89 error: aborting due to 11 previous errors
90
91 Some errors have detailed explanations: E0084, E0690, E0691, E0731.
92 For more information about an error, try `rustc --explain E0084`.