11error: `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
33 |
44LL | fn uf(x: U);
55 | ^ not FFI-safe
66 |
77 = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
88 = note: enum has no representation hint
99note: the type is defined here
10- --> $DIR/lint-ctypes-enum.rs:9 :1
10+ --> $DIR/lint-ctypes-enum.rs:11 :1
1111 |
1212LL | enum U {
1313 | ^^^^^^
@@ -18,51 +18,77 @@ LL | #![deny(improper_ctypes)]
1818 | ^^^^^^^^^^^^^^^
1919
2020error: `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
2222 |
2323LL | fn bf(x: B);
2424 | ^ not FFI-safe
2525 |
2626 = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
2727 = note: enum has no representation hint
2828note: the type is defined here
29- --> $DIR/lint-ctypes-enum.rs:12 :1
29+ --> $DIR/lint-ctypes-enum.rs:14 :1
3030 |
3131LL | enum B {
3232 | ^^^^^^
3333
3434error: `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
3636 |
3737LL | fn tf(x: T);
3838 | ^ not FFI-safe
3939 |
4040 = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
4141 = note: enum has no representation hint
4242note: the type is defined here
43- --> $DIR/lint-ctypes-enum.rs:16 :1
43+ --> $DIR/lint-ctypes-enum.rs:18 :1
4444 |
4545LL | enum T {
4646 | ^^^^^^
4747
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+
4874error: `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
5076 |
5177LL | fn option_nonzero_u128(x: Option<num::NonZero<u128>>);
5278 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
5379 |
5480 = note: 128-bit integers don't currently have a known stable ABI
5581
5682error: `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
5884 |
5985LL | fn option_nonzero_i128(x: Option<num::NonZero<i128>>);
6086 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
6187 |
6288 = note: 128-bit integers don't currently have a known stable ABI
6389
6490error: `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
6692 |
6793LL | fn option_transparent_union(x: Option<TransparentUnion<num::NonZero<u8>>>);
6894 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -71,7 +97,7 @@ LL | fn option_transparent_union(x: Option<TransparentUnion<num::NonZero<u8>
7197 = note: enum has no representation hint
7298
7399error: `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
75101 |
76102LL | fn option_repr_rust(x: Option<Rust<num::NonZero<u8>>>);
77103 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -80,7 +106,7 @@ LL | fn option_repr_rust(x: Option<Rust<num::NonZero<u8>>>);
80106 = note: enum has no representation hint
81107
82108error: `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
84110 |
85111LL | fn option_u8(x: Option<u8>);
86112 | ^^^^^^^^^^ not FFI-safe
@@ -89,23 +115,23 @@ LL | fn option_u8(x: Option<u8>);
89115 = note: enum has no representation hint
90116
91117error: `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
93119 |
94120LL | fn result_nonzero_u128_t(x: Result<num::NonZero<u128>, ()>);
95121 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
96122 |
97123 = note: 128-bit integers don't currently have a known stable ABI
98124
99125error: `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
101127 |
102128LL | fn result_nonzero_i128_t(x: Result<num::NonZero<i128>, ()>);
103129 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
104130 |
105131 = note: 128-bit integers don't currently have a known stable ABI
106132
107133error: `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
109135 |
110136LL | fn result_transparent_union_t(x: Result<TransparentUnion<num::NonZero<u8>>, ()>);
111137 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -114,7 +140,7 @@ LL | fn result_transparent_union_t(x: Result<TransparentUnion<num::NonZero<u
114140 = note: enum has no representation hint
115141
116142error: `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
118144 |
119145LL | fn result_repr_rust_t(x: Result<Rust<num::NonZero<u8>>, ()>);
120146 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -123,7 +149,7 @@ LL | fn result_repr_rust_t(x: Result<Rust<num::NonZero<u8>>, ()>);
123149 = note: enum has no representation hint
124150
125151error: `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
127153 |
128154LL | fn result_1zst_exhaustive_single_variant_t(x: Result<num::NonZero<u8>, U>);
129155 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -132,7 +158,7 @@ LL | fn result_1zst_exhaustive_single_variant_t(x: Result<num::NonZero<u8>,
132158 = note: enum has no representation hint
133159
134160error: `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
136162 |
137163LL | fn result_1zst_exhaustive_multiple_variant_t(x: Result<num::NonZero<u8>, B>);
138164 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -141,7 +167,7 @@ LL | fn result_1zst_exhaustive_multiple_variant_t(x: Result<num::NonZero<u8>
141167 = note: enum has no representation hint
142168
143169error: `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
145171 |
146172LL | fn result_1zst_non_exhaustive_no_variant_t(x: Result<num::NonZero<u8>, NonExhaustive>);
147173 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -150,7 +176,7 @@ LL | fn result_1zst_non_exhaustive_no_variant_t(x: Result<num::NonZero<u8>,
150176 = note: enum has no representation hint
151177
152178error: `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
154180 |
155181LL | fn result_1zst_exhaustive_single_field_t(x: Result<num::NonZero<u8>, Field>);
156182 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -159,7 +185,7 @@ LL | fn result_1zst_exhaustive_single_field_t(x: Result<num::NonZero<u8>, Fi
159185 = note: enum has no representation hint
160186
161187error: `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
163189 |
164190LL | fn result_cascading_t(x: Result<Result<(), num::NonZero<u8>>, ()>);
165191 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -168,23 +194,23 @@ LL | fn result_cascading_t(x: Result<Result<(), num::NonZero<u8>>, ()>);
168194 = note: enum has no representation hint
169195
170196error: `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
172198 |
173199LL | fn result_nonzero_u128_e(x: Result<(), num::NonZero<u128>>);
174200 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
175201 |
176202 = note: 128-bit integers don't currently have a known stable ABI
177203
178204error: `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
180206 |
181207LL | fn result_nonzero_i128_e(x: Result<(), num::NonZero<i128>>);
182208 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
183209 |
184210 = note: 128-bit integers don't currently have a known stable ABI
185211
186212error: `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
188214 |
189215LL | fn result_transparent_union_e(x: Result<(), TransparentUnion<num::NonZero<u8>>>);
190216 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -193,7 +219,7 @@ LL | fn result_transparent_union_e(x: Result<(), TransparentUnion<num::NonZe
193219 = note: enum has no representation hint
194220
195221error: `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
197223 |
198224LL | fn result_repr_rust_e(x: Result<(), Rust<num::NonZero<u8>>>);
199225 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -202,7 +228,7 @@ LL | fn result_repr_rust_e(x: Result<(), Rust<num::NonZero<u8>>>);
202228 = note: enum has no representation hint
203229
204230error: `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
206232 |
207233LL | fn result_1zst_exhaustive_single_variant_e(x: Result<U, num::NonZero<u8>>);
208234 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -211,7 +237,7 @@ LL | fn result_1zst_exhaustive_single_variant_e(x: Result<U, num::NonZero<u8
211237 = note: enum has no representation hint
212238
213239error: `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
215241 |
216242LL | fn result_1zst_exhaustive_multiple_variant_e(x: Result<B, num::NonZero<u8>>);
217243 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -220,7 +246,7 @@ LL | fn result_1zst_exhaustive_multiple_variant_e(x: Result<B, num::NonZero<
220246 = note: enum has no representation hint
221247
222248error: `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
224250 |
225251LL | fn result_1zst_non_exhaustive_no_variant_e(x: Result<NonExhaustive, num::NonZero<u8>>);
226252 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -229,7 +255,7 @@ LL | fn result_1zst_non_exhaustive_no_variant_e(x: Result<NonExhaustive, num
229255 = note: enum has no representation hint
230256
231257error: `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
233259 |
234260LL | fn result_1zst_exhaustive_single_field_e(x: Result<Field, num::NonZero<u8>>);
235261 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -238,7 +264,7 @@ LL | fn result_1zst_exhaustive_single_field_e(x: Result<Field, num::NonZero<
238264 = note: enum has no representation hint
239265
240266error: `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
242268 |
243269LL | fn result_cascading_e(x: Result<(), Result<(), num::NonZero<u8>>>);
244270 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -247,13 +273,13 @@ LL | fn result_cascading_e(x: Result<(), Result<(), num::NonZero<u8>>>);
247273 = note: enum has no representation hint
248274
249275error: `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
251277 |
252278LL | fn result_unit_t_e(x: Result<(), ()>);
253279 | ^^^^^^^^^^^^^^ not FFI-safe
254280 |
255281 = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
256282 = note: enum has no representation hint
257283
258- error: aborting due to 27 previous errors
284+ error: aborting due to 29 previous errors
259285
0 commit comments