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