@@ -45,24 +45,8 @@ note: the type is defined here
45
45
LL | enum T {
46
46
| ^^^^^^
47
47
48
- error: `extern` block uses type `u128`, which is not FFI-safe
49
- --> $DIR/lint-ctypes-enum.rs:82:31
50
- |
51
- LL | fn option_nonzero_u128(x: Option<num::NonZero<u128>>);
52
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
53
- |
54
- = note: 128-bit integers don't currently have a known stable ABI
55
-
56
- error: `extern` block uses type `i128`, which is not FFI-safe
57
- --> $DIR/lint-ctypes-enum.rs:89:31
58
- |
59
- LL | fn option_nonzero_i128(x: Option<num::NonZero<i128>>);
60
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
61
- |
62
- = note: 128-bit integers don't currently have a known stable ABI
63
-
64
48
error: `extern` block uses type `Option<TransparentUnion<NonZero<u8>>>`, which is not FFI-safe
65
- --> $DIR/lint-ctypes-enum.rs:94 :36
49
+ --> $DIR/lint-ctypes-enum.rs:92 :36
66
50
|
67
51
LL | fn option_transparent_union(x: Option<TransparentUnion<num::NonZero<u8>>>);
68
52
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -71,7 +55,7 @@ LL | fn option_transparent_union(x: Option<TransparentUnion<num::NonZero<u8>
71
55
= note: enum has no representation hint
72
56
73
57
error: `extern` block uses type `Option<Rust<NonZero<u8>>>`, which is not FFI-safe
74
- --> $DIR/lint-ctypes-enum.rs:96 :28
58
+ --> $DIR/lint-ctypes-enum.rs:94 :28
75
59
|
76
60
LL | fn option_repr_rust(x: Option<Rust<num::NonZero<u8>>>);
77
61
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -80,32 +64,16 @@ LL | fn option_repr_rust(x: Option<Rust<num::NonZero<u8>>>);
80
64
= note: enum has no representation hint
81
65
82
66
error: `extern` block uses type `Option<u8>`, which is not FFI-safe
83
- --> $DIR/lint-ctypes-enum.rs:97 :21
67
+ --> $DIR/lint-ctypes-enum.rs:95 :21
84
68
|
85
69
LL | fn option_u8(x: Option<u8>);
86
70
| ^^^^^^^^^^ not FFI-safe
87
71
|
88
72
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
89
73
= note: enum has no representation hint
90
74
91
- error: `extern` block uses type `u128`, which is not FFI-safe
92
- --> $DIR/lint-ctypes-enum.rs:107:33
93
- |
94
- LL | fn result_nonzero_u128_t(x: Result<num::NonZero<u128>, ()>);
95
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
96
- |
97
- = note: 128-bit integers don't currently have a known stable ABI
98
-
99
- error: `extern` block uses type `i128`, which is not FFI-safe
100
- --> $DIR/lint-ctypes-enum.rs:114:33
101
- |
102
- LL | fn result_nonzero_i128_t(x: Result<num::NonZero<i128>, ()>);
103
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
104
- |
105
- = note: 128-bit integers don't currently have a known stable ABI
106
-
107
75
error: `extern` block uses type `Result<TransparentUnion<NonZero<u8>>, ()>`, which is not FFI-safe
108
- --> $DIR/lint-ctypes-enum.rs:119 :38
76
+ --> $DIR/lint-ctypes-enum.rs:115 :38
109
77
|
110
78
LL | fn result_transparent_union_t(x: Result<TransparentUnion<num::NonZero<u8>>, ()>);
111
79
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -114,7 +82,7 @@ LL | fn result_transparent_union_t(x: Result<TransparentUnion<num::NonZero<u
114
82
= note: enum has no representation hint
115
83
116
84
error: `extern` block uses type `Result<Rust<NonZero<u8>>, ()>`, which is not FFI-safe
117
- --> $DIR/lint-ctypes-enum.rs:121 :30
85
+ --> $DIR/lint-ctypes-enum.rs:117 :30
118
86
|
119
87
LL | fn result_repr_rust_t(x: Result<Rust<num::NonZero<u8>>, ()>);
120
88
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -123,7 +91,7 @@ LL | fn result_repr_rust_t(x: Result<Rust<num::NonZero<u8>>, ()>);
123
91
= note: enum has no representation hint
124
92
125
93
error: `extern` block uses type `Result<NonZero<u8>, U>`, which is not FFI-safe
126
- --> $DIR/lint-ctypes-enum.rs:125 :51
94
+ --> $DIR/lint-ctypes-enum.rs:121 :51
127
95
|
128
96
LL | fn result_1zst_exhaustive_single_variant_t(x: Result<num::NonZero<u8>, U>);
129
97
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -132,7 +100,7 @@ LL | fn result_1zst_exhaustive_single_variant_t(x: Result<num::NonZero<u8>,
132
100
= note: enum has no representation hint
133
101
134
102
error: `extern` block uses type `Result<NonZero<u8>, B>`, which is not FFI-safe
135
- --> $DIR/lint-ctypes-enum.rs:127 :53
103
+ --> $DIR/lint-ctypes-enum.rs:123 :53
136
104
|
137
105
LL | fn result_1zst_exhaustive_multiple_variant_t(x: Result<num::NonZero<u8>, B>);
138
106
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -141,7 +109,7 @@ LL | fn result_1zst_exhaustive_multiple_variant_t(x: Result<num::NonZero<u8>
141
109
= note: enum has no representation hint
142
110
143
111
error: `extern` block uses type `Result<NonZero<u8>, NonExhaustive>`, which is not FFI-safe
144
- --> $DIR/lint-ctypes-enum.rs:129 :51
112
+ --> $DIR/lint-ctypes-enum.rs:125 :51
145
113
|
146
114
LL | fn result_1zst_non_exhaustive_no_variant_t(x: Result<num::NonZero<u8>, NonExhaustive>);
147
115
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -150,7 +118,7 @@ LL | fn result_1zst_non_exhaustive_no_variant_t(x: Result<num::NonZero<u8>,
150
118
= note: enum has no representation hint
151
119
152
120
error: `extern` block uses type `Result<NonZero<u8>, Field>`, which is not FFI-safe
153
- --> $DIR/lint-ctypes-enum.rs:132 :49
121
+ --> $DIR/lint-ctypes-enum.rs:128 :49
154
122
|
155
123
LL | fn result_1zst_exhaustive_single_field_t(x: Result<num::NonZero<u8>, Field>);
156
124
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -159,32 +127,16 @@ LL | fn result_1zst_exhaustive_single_field_t(x: Result<num::NonZero<u8>, Fi
159
127
= note: enum has no representation hint
160
128
161
129
error: `extern` block uses type `Result<Result<(), NonZero<u8>>, ()>`, which is not FFI-safe
162
- --> $DIR/lint-ctypes-enum.rs:134 :30
130
+ --> $DIR/lint-ctypes-enum.rs:130 :30
163
131
|
164
132
LL | fn result_cascading_t(x: Result<Result<(), num::NonZero<u8>>, ()>);
165
133
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
166
134
|
167
135
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
168
136
= note: enum has no representation hint
169
137
170
- error: `extern` block uses type `u128`, which is not FFI-safe
171
- --> $DIR/lint-ctypes-enum.rs:145:33
172
- |
173
- LL | fn result_nonzero_u128_e(x: Result<(), num::NonZero<u128>>);
174
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
175
- |
176
- = note: 128-bit integers don't currently have a known stable ABI
177
-
178
- error: `extern` block uses type `i128`, which is not FFI-safe
179
- --> $DIR/lint-ctypes-enum.rs:152:33
180
- |
181
- LL | fn result_nonzero_i128_e(x: Result<(), num::NonZero<i128>>);
182
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
183
- |
184
- = note: 128-bit integers don't currently have a known stable ABI
185
-
186
138
error: `extern` block uses type `Result<(), TransparentUnion<NonZero<u8>>>`, which is not FFI-safe
187
- --> $DIR/lint-ctypes-enum.rs:157 :38
139
+ --> $DIR/lint-ctypes-enum.rs:151 :38
188
140
|
189
141
LL | fn result_transparent_union_e(x: Result<(), TransparentUnion<num::NonZero<u8>>>);
190
142
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -193,7 +145,7 @@ LL | fn result_transparent_union_e(x: Result<(), TransparentUnion<num::NonZe
193
145
= note: enum has no representation hint
194
146
195
147
error: `extern` block uses type `Result<(), Rust<NonZero<u8>>>`, which is not FFI-safe
196
- --> $DIR/lint-ctypes-enum.rs:159 :30
148
+ --> $DIR/lint-ctypes-enum.rs:153 :30
197
149
|
198
150
LL | fn result_repr_rust_e(x: Result<(), Rust<num::NonZero<u8>>>);
199
151
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -202,7 +154,7 @@ LL | fn result_repr_rust_e(x: Result<(), Rust<num::NonZero<u8>>>);
202
154
= note: enum has no representation hint
203
155
204
156
error: `extern` block uses type `Result<U, NonZero<u8>>`, which is not FFI-safe
205
- --> $DIR/lint-ctypes-enum.rs:163 :51
157
+ --> $DIR/lint-ctypes-enum.rs:157 :51
206
158
|
207
159
LL | fn result_1zst_exhaustive_single_variant_e(x: Result<U, num::NonZero<u8>>);
208
160
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -211,7 +163,7 @@ LL | fn result_1zst_exhaustive_single_variant_e(x: Result<U, num::NonZero<u8
211
163
= note: enum has no representation hint
212
164
213
165
error: `extern` block uses type `Result<B, NonZero<u8>>`, which is not FFI-safe
214
- --> $DIR/lint-ctypes-enum.rs:165 :53
166
+ --> $DIR/lint-ctypes-enum.rs:159 :53
215
167
|
216
168
LL | fn result_1zst_exhaustive_multiple_variant_e(x: Result<B, num::NonZero<u8>>);
217
169
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -220,7 +172,7 @@ LL | fn result_1zst_exhaustive_multiple_variant_e(x: Result<B, num::NonZero<
220
172
= note: enum has no representation hint
221
173
222
174
error: `extern` block uses type `Result<NonExhaustive, NonZero<u8>>`, which is not FFI-safe
223
- --> $DIR/lint-ctypes-enum.rs:167 :51
175
+ --> $DIR/lint-ctypes-enum.rs:161 :51
224
176
|
225
177
LL | fn result_1zst_non_exhaustive_no_variant_e(x: Result<NonExhaustive, num::NonZero<u8>>);
226
178
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -229,7 +181,7 @@ LL | fn result_1zst_non_exhaustive_no_variant_e(x: Result<NonExhaustive, num
229
181
= note: enum has no representation hint
230
182
231
183
error: `extern` block uses type `Result<Field, NonZero<u8>>`, which is not FFI-safe
232
- --> $DIR/lint-ctypes-enum.rs:170 :49
184
+ --> $DIR/lint-ctypes-enum.rs:164 :49
233
185
|
234
186
LL | fn result_1zst_exhaustive_single_field_e(x: Result<Field, num::NonZero<u8>>);
235
187
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -238,7 +190,7 @@ LL | fn result_1zst_exhaustive_single_field_e(x: Result<Field, num::NonZero<
238
190
= note: enum has no representation hint
239
191
240
192
error: `extern` block uses type `Result<(), Result<(), NonZero<u8>>>`, which is not FFI-safe
241
- --> $DIR/lint-ctypes-enum.rs:172 :30
193
+ --> $DIR/lint-ctypes-enum.rs:166 :30
242
194
|
243
195
LL | fn result_cascading_e(x: Result<(), Result<(), num::NonZero<u8>>>);
244
196
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -247,13 +199,13 @@ LL | fn result_cascading_e(x: Result<(), Result<(), num::NonZero<u8>>>);
247
199
= note: enum has no representation hint
248
200
249
201
error: `extern` block uses type `Result<(), ()>`, which is not FFI-safe
250
- --> $DIR/lint-ctypes-enum.rs:174 :27
202
+ --> $DIR/lint-ctypes-enum.rs:168 :27
251
203
|
252
204
LL | fn result_unit_t_e(x: Result<(), ()>);
253
205
| ^^^^^^^^^^^^^^ not FFI-safe
254
206
|
255
207
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
256
208
= note: enum has no representation hint
257
209
258
- error: aborting due to 27 previous errors
210
+ error: aborting due to 21 previous errors
259
211
0 commit comments