@@ -45,24 +45,8 @@ note: the type is defined here
4545LL | enum T {
4646 | ^^^^^^
4747
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-
6448error: `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
6650 |
6751LL | fn option_transparent_union(x: Option<TransparentUnion<num::NonZero<u8>>>);
6852 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -71,7 +55,7 @@ LL | fn option_transparent_union(x: Option<TransparentUnion<num::NonZero<u8>
7155 = note: enum has no representation hint
7256
7357error: `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
7559 |
7660LL | fn option_repr_rust(x: Option<Rust<num::NonZero<u8>>>);
7761 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -80,32 +64,16 @@ LL | fn option_repr_rust(x: Option<Rust<num::NonZero<u8>>>);
8064 = note: enum has no representation hint
8165
8266error: `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
8468 |
8569LL | fn option_u8(x: Option<u8>);
8670 | ^^^^^^^^^^ not FFI-safe
8771 |
8872 = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
8973 = note: enum has no representation hint
9074
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-
10775error: `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
10977 |
11078LL | fn result_transparent_union_t(x: Result<TransparentUnion<num::NonZero<u8>>, ()>);
11179 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -114,7 +82,7 @@ LL | fn result_transparent_union_t(x: Result<TransparentUnion<num::NonZero<u
11482 = note: enum has no representation hint
11583
11684error: `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
11886 |
11987LL | fn result_repr_rust_t(x: Result<Rust<num::NonZero<u8>>, ()>);
12088 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -123,7 +91,7 @@ LL | fn result_repr_rust_t(x: Result<Rust<num::NonZero<u8>>, ()>);
12391 = note: enum has no representation hint
12492
12593error: `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
12795 |
12896LL | fn result_1zst_exhaustive_single_variant_t(x: Result<num::NonZero<u8>, U>);
12997 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -132,7 +100,7 @@ LL | fn result_1zst_exhaustive_single_variant_t(x: Result<num::NonZero<u8>,
132100 = note: enum has no representation hint
133101
134102error: `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
136104 |
137105LL | fn result_1zst_exhaustive_multiple_variant_t(x: Result<num::NonZero<u8>, B>);
138106 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -141,7 +109,7 @@ LL | fn result_1zst_exhaustive_multiple_variant_t(x: Result<num::NonZero<u8>
141109 = note: enum has no representation hint
142110
143111error: `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
145113 |
146114LL | fn result_1zst_non_exhaustive_no_variant_t(x: Result<num::NonZero<u8>, NonExhaustive>);
147115 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -150,7 +118,7 @@ LL | fn result_1zst_non_exhaustive_no_variant_t(x: Result<num::NonZero<u8>,
150118 = note: enum has no representation hint
151119
152120error: `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
154122 |
155123LL | fn result_1zst_exhaustive_single_field_t(x: Result<num::NonZero<u8>, Field>);
156124 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -159,32 +127,16 @@ LL | fn result_1zst_exhaustive_single_field_t(x: Result<num::NonZero<u8>, Fi
159127 = note: enum has no representation hint
160128
161129error: `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
163131 |
164132LL | fn result_cascading_t(x: Result<Result<(), num::NonZero<u8>>, ()>);
165133 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
166134 |
167135 = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
168136 = note: enum has no representation hint
169137
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-
186138error: `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
188140 |
189141LL | fn result_transparent_union_e(x: Result<(), TransparentUnion<num::NonZero<u8>>>);
190142 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -193,7 +145,7 @@ LL | fn result_transparent_union_e(x: Result<(), TransparentUnion<num::NonZe
193145 = note: enum has no representation hint
194146
195147error: `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
197149 |
198150LL | fn result_repr_rust_e(x: Result<(), Rust<num::NonZero<u8>>>);
199151 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -202,7 +154,7 @@ LL | fn result_repr_rust_e(x: Result<(), Rust<num::NonZero<u8>>>);
202154 = note: enum has no representation hint
203155
204156error: `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
206158 |
207159LL | fn result_1zst_exhaustive_single_variant_e(x: Result<U, num::NonZero<u8>>);
208160 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -211,7 +163,7 @@ LL | fn result_1zst_exhaustive_single_variant_e(x: Result<U, num::NonZero<u8
211163 = note: enum has no representation hint
212164
213165error: `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
215167 |
216168LL | fn result_1zst_exhaustive_multiple_variant_e(x: Result<B, num::NonZero<u8>>);
217169 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -220,7 +172,7 @@ LL | fn result_1zst_exhaustive_multiple_variant_e(x: Result<B, num::NonZero<
220172 = note: enum has no representation hint
221173
222174error: `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
224176 |
225177LL | fn result_1zst_non_exhaustive_no_variant_e(x: Result<NonExhaustive, num::NonZero<u8>>);
226178 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -229,7 +181,7 @@ LL | fn result_1zst_non_exhaustive_no_variant_e(x: Result<NonExhaustive, num
229181 = note: enum has no representation hint
230182
231183error: `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
233185 |
234186LL | fn result_1zst_exhaustive_single_field_e(x: Result<Field, num::NonZero<u8>>);
235187 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -238,7 +190,7 @@ LL | fn result_1zst_exhaustive_single_field_e(x: Result<Field, num::NonZero<
238190 = note: enum has no representation hint
239191
240192error: `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
242194 |
243195LL | fn result_cascading_e(x: Result<(), Result<(), num::NonZero<u8>>>);
244196 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -247,13 +199,13 @@ LL | fn result_cascading_e(x: Result<(), Result<(), num::NonZero<u8>>>);
247199 = note: enum has no representation hint
248200
249201error: `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
251203 |
252204LL | fn result_unit_t_e(x: Result<(), ()>);
253205 | ^^^^^^^^^^^^^^ not FFI-safe
254206 |
255207 = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
256208 = note: enum has no representation hint
257209
258- error: aborting due to 27 previous errors
210+ error: aborting due to 21 previous errors
259211
0 commit comments