@@ -2,61 +2,57 @@ error[E0690]: transparent struct needs exactly one non-zero-sized field, but has
2
2
--> $DIR/repr-transparent.rs:11:1
3
3
|
4
4
LL | struct NoFields;
5
- | ^^^^^^^^^^^^^^^^
5
+ | ^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0
6
6
7
7
error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0
8
8
--> $DIR/repr-transparent.rs:14:1
9
9
|
10
10
LL | struct ContainsOnlyZst(());
11
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
11
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0
12
12
13
13
error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0
14
14
--> $DIR/repr-transparent.rs:17:1
15
15
|
16
16
LL | struct ContainsOnlyZstArray([bool; 0]);
17
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0
18
18
19
19
error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 0
20
20
--> $DIR/repr-transparent.rs:20:1
21
21
|
22
22
LL | struct ContainsMultipleZst(PhantomData<*const i32>, NoFields);
23
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0
24
24
25
25
error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 2
26
26
--> $DIR/repr-transparent.rs:24:1
27
27
|
28
28
LL | struct MultipleNonZst(u8, u8);
29
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30
- |
31
- note: the following non-zero-sized fields exist on `MultipleNonZst`:
32
- --> $DIR/repr-transparent.rs:24:23
33
- |
34
- LL | struct MultipleNonZst(u8, u8);
35
- | ^^ ^^
29
+ | ^^^^^^^^^^^^^^^^^^^^^^--^^--^^
30
+ | | | |
31
+ | | | this field is non-zero-sized
32
+ | | this field is non-zero-sized
33
+ | needs exactly one non-zero-sized field, but has 2
36
34
37
35
error[E0690]: transparent struct needs exactly one non-zero-sized field, but has 2
38
36
--> $DIR/repr-transparent.rs:30:1
39
37
|
40
38
LL | pub struct StructWithProjection(f32, <f32 as Mirror>::It);
41
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42
- |
43
- note: the following non-zero-sized fields exist on `StructWithProjection`:
44
- --> $DIR/repr-transparent.rs:30:33
45
- |
46
- LL | pub struct StructWithProjection(f32, <f32 as Mirror>::It);
47
- | ^^^ ^^^^^^^^^^^^^^^^^^^
39
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---^^-------------------^^
40
+ | | | |
41
+ | | | this field is non-zero-sized
42
+ | | this field is non-zero-sized
43
+ | needs exactly one non-zero-sized field, but has 2
48
44
49
45
error[E0691]: zero-sized field in transparent struct has alignment larger than 1
50
46
--> $DIR/repr-transparent.rs:34:32
51
47
|
52
48
LL | struct NontrivialAlignZst(u32, [u16; 0]);
53
- | ^^^^^^^^
49
+ | ^^^^^^^^ has alignment larger than 1
54
50
55
51
error[E0691]: zero-sized field in transparent struct has alignment larger than 1
56
52
--> $DIR/repr-transparent.rs:40:24
57
53
|
58
54
LL | struct GenericAlign<T>(ZstAlign32<T>, u32);
59
- | ^^^^^^^^^^^^^
55
+ | ^^^^^^^^^^^^^ has alignment larger than 1
60
56
61
57
error[E0084]: unsupported representation for zero-variant enum
62
58
--> $DIR/repr-transparent.rs:42:1
@@ -70,71 +66,49 @@ error[E0731]: transparent enum needs exactly one variant, but has 0
70
66
--> $DIR/repr-transparent.rs:43:1
71
67
|
72
68
LL | enum Void {}
73
- | ^^^^^^^^^^^^
69
+ | ^^^^^^^^^ needs exactly one variant, but has 0
74
70
75
71
error[E0690]: the variant of a transparent enum needs exactly one non-zero-sized field, but has 0
76
72
--> $DIR/repr-transparent.rs:47:1
77
73
|
78
- LL | / enum FieldlessEnum {
79
- LL | | Foo,
80
- LL | | }
81
- | |_^
74
+ LL | enum FieldlessEnum {
75
+ | ^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0
82
76
83
77
error[E0690]: the variant of a transparent enum needs exactly one non-zero-sized field, but has 2
84
78
--> $DIR/repr-transparent.rs:52:1
85
79
|
86
- LL | / enum TooManyFieldsEnum {
87
- LL | | Foo(u32, String),
88
- LL | | }
89
- | |_^
90
- |
91
- note: the following non-zero-sized fields exist on `TooManyFieldsEnum`:
92
- --> $DIR/repr-transparent.rs:53:9
93
- |
80
+ LL | enum TooManyFieldsEnum {
81
+ | ^^^^^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 2
94
82
LL | Foo(u32, String),
95
- | ^^^ ^^^^^^
83
+ | --- ------ this field is non-zero-sized
84
+ | |
85
+ | this field is non-zero-sized
96
86
97
87
error[E0731]: transparent enum needs exactly one variant, but has 2
98
88
--> $DIR/repr-transparent.rs:58:1
99
89
|
100
- LL | / enum TooManyVariants {
101
- LL | | Foo(String),
102
- LL | | Bar,
103
- LL | | }
104
- | |_^
105
- |
106
- note: the following variants exist on `TooManyVariants`
107
- --> $DIR/repr-transparent.rs:59:5
108
- |
90
+ LL | enum TooManyVariants {
91
+ | ^^^^^^^^^^^^^^^^^^^^ needs exactly one variant, but has 2
109
92
LL | Foo(String),
110
- | ^^^^^^^^^^^
93
+ | -----------
111
94
LL | Bar,
112
- | ^^^
95
+ | --- too many variants in `TooManyVariants`
113
96
114
97
error[E0690]: transparent union needs exactly one non-zero-sized field, but has 0
115
98
--> $DIR/repr-transparent.rs:64:1
116
99
|
117
- LL | / union UnitUnion {
118
- LL | | u: (),
119
- LL | | }
120
- | |_^
100
+ LL | union UnitUnion {
101
+ | ^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 0
121
102
122
103
error[E0690]: transparent union needs exactly one non-zero-sized field, but has 2
123
104
--> $DIR/repr-transparent.rs:69:1
124
105
|
125
- LL | / union TooManyFields {
126
- LL | | u: u32,
127
- LL | | s: i32
128
- LL | | }
129
- | |_^
130
- |
131
- note: the following non-zero-sized fields exist on `TooManyFields`:
132
- --> $DIR/repr-transparent.rs:70:5
133
- |
106
+ LL | union TooManyFields {
107
+ | ^^^^^^^^^^^^^^^^^^^ needs exactly one non-zero-sized field, but has 2
134
108
LL | u: u32,
135
- | ^^^^^^
109
+ | ------ this field is non-zero-sized
136
110
LL | s: i32
137
- | ^^^^^^
111
+ | ------ this field is non-zero-sized
138
112
139
113
error: aborting due to 15 previous errors
140
114
0 commit comments