@@ -201,29 +201,29 @@ LL | pub fn raw_array(arr: [u8; 8]);
201201 = note: passing raw arrays by value is not FFI-safe
202202
203203error: `extern` block uses type `char`, which is not FFI-safe
204- --> $DIR/lint-ctypes.rs:97:36
204+ --> $DIR/lint-ctypes.rs:98:12
205205 |
206- LL | pub fn multi_errors_per_arg( f: for<'a> extern "C" fn(a:char, b:&dyn Debug, c: Box<TwoBadTypes<'a>>));
207- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
206+ LL | f: for<'a> extern "C" fn(a:char, b:&dyn Debug, c: Box<TwoBadTypes<'a>>)
207+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
208208 |
209209 = note: the function pointer to `for<'a, 'b> extern "C" fn(char, &'a (dyn Debug + 'a), Box<TwoBadTypes<'b>>)` is FFI-unsafe due to `char`
210210 = help: consider using `u32` or `libc::wchar_t` instead
211211 = note: the `char` type has no C equivalent
212212
213213error: `extern` block uses type `&dyn Debug`, which is not FFI-safe
214- --> $DIR/lint-ctypes.rs:97:36
214+ --> $DIR/lint-ctypes.rs:98:12
215215 |
216- LL | pub fn multi_errors_per_arg( f: for<'a> extern "C" fn(a:char, b:&dyn Debug, c: Box<TwoBadTypes<'a>>));
217- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
216+ LL | f: for<'a> extern "C" fn(a:char, b:&dyn Debug, c: Box<TwoBadTypes<'a>>)
217+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
218218 |
219219 = note: the function pointer to `for<'a, 'b> extern "C" fn(char, &'a (dyn Debug + 'a), Box<TwoBadTypes<'b>>)` is FFI-unsafe due to `&dyn Debug`
220220 = note: this reference to an unsized type contains metadata, which makes it incompatible with a C pointer
221221
222222error: `extern` block uses type `&[u8]`, which is not FFI-safe
223- --> $DIR/lint-ctypes.rs:97:36
223+ --> $DIR/lint-ctypes.rs:98:12
224224 |
225- LL | pub fn multi_errors_per_arg( f: for<'a> extern "C" fn(a:char, b:&dyn Debug, c: Box<TwoBadTypes<'a>>));
226- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
225+ LL | f: for<'a> extern "C" fn(a:char, b:&dyn Debug, c: Box<TwoBadTypes<'a>>)
226+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
227227 |
228228 = note: the function pointer to `for<'a, 'b> extern "C" fn(char, &'a (dyn Debug + 'a), Box<TwoBadTypes<'b>>)` is FFI-unsafe due to `Box<TwoBadTypes<'_>>`
229229 = note: this reference (`Box<TwoBadTypes<'_>>`) is ABI-compatible with a C pointer, but `TwoBadTypes<'_>` itself does not have a C layout
@@ -237,15 +237,15 @@ LL | pub struct TwoBadTypes<'a> {
237237 = note: this reference to an unsized type contains metadata, which makes it incompatible with a C pointer
238238
239239error: `extern` block uses type `&UnsizedStructBecauseDyn`, which is not FFI-safe
240- --> $DIR/lint-ctypes.rs:104 :47
240+ --> $DIR/lint-ctypes.rs:106 :47
241241 |
242242LL | pub fn struct_unsized_ptr_has_metadata(p: &UnsizedStructBecauseDyn);
243243 | ^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
244244 |
245245 = note: this reference to an unsized type contains metadata, which makes it incompatible with a C pointer
246246
247247error: `extern` block uses type `Option<UnsafeCell<extern "C" fn()>>`, which is not FFI-safe
248- --> $DIR/lint-ctypes.rs:106 :26
248+ --> $DIR/lint-ctypes.rs:108 :26
249249 |
250250LL | pub fn no_niche_a(a: Option<UnsafeCell<extern "C" fn()>>);
251251 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -254,7 +254,7 @@ LL | pub fn no_niche_a(a: Option<UnsafeCell<extern "C" fn()>>);
254254 = note: enum has no representation hint
255255
256256error: `extern` block uses type `Option<UnsafeCell<&i32>>`, which is not FFI-safe
257- --> $DIR/lint-ctypes.rs:108 :26
257+ --> $DIR/lint-ctypes.rs:110 :26
258258 |
259259LL | pub fn no_niche_b(b: Option<UnsafeCell<&i32>>);
260260 | ^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -263,15 +263,15 @@ LL | pub fn no_niche_b(b: Option<UnsafeCell<&i32>>);
263263 = note: enum has no representation hint
264264
265265error: `extern` block uses type `u128`, which is not FFI-safe
266- --> $DIR/lint-ctypes.rs:111 :34
266+ --> $DIR/lint-ctypes.rs:113 :34
267267 |
268268LL | pub static static_u128_type: u128;
269269 | ^^^^ not FFI-safe
270270 |
271271 = note: 128-bit integers don't currently have a known stable ABI
272272
273273error: `extern` block uses type `u128`, which is not FFI-safe
274- --> $DIR/lint-ctypes.rs:112 :40
274+ --> $DIR/lint-ctypes.rs:114 :40
275275 |
276276LL | pub static static_u128_array_type: [u128; 16];
277277 | ^^^^^^^^^^ not FFI-safe
0 commit comments