11error: `extern` callback uses type `[u8]`, which is not FFI-safe
2- --> $DIR/lint-94223.rs:4:15
2+ --> $DIR/lint-94223.rs:4:29
33 |
44LL | pub fn bad(f: extern "C" fn([u8])) {}
5- | ^^^^^^^^^^^^^^^ ^^^^ not FFI-safe
5+ | ^^^^ not FFI-safe
66 |
77 = help: consider using a raw pointer instead
88 = note: slices have no C equivalent
@@ -13,73 +13,73 @@ LL | #![deny(improper_ctypes_definitions, improper_ctypes)]
1313 | ^^^^^^^^^^^^^^^
1414
1515error: `extern` callback uses type `[u8]`, which is not FFI-safe
16- --> $DIR/lint-94223.rs:7:28
16+ --> $DIR/lint-94223.rs:7:42
1717 |
1818LL | pub fn bad_twice(f: Result<extern "C" fn([u8]), extern "C" fn([u8])>) {}
19- | ^^^^^^^^^^^^^^^ ^^^^ not FFI-safe
19+ | ^^^^ not FFI-safe
2020 |
2121 = help: consider using a raw pointer instead
2222 = note: slices have no C equivalent
2323
2424error: `extern` callback uses type `[u8]`, which is not FFI-safe
25- --> $DIR/lint-94223.rs:7:49
25+ --> $DIR/lint-94223.rs:7:63
2626 |
2727LL | pub fn bad_twice(f: Result<extern "C" fn([u8]), extern "C" fn([u8])>) {}
28- | ^^^^^^^^^^^^^^^ ^^^^ not FFI-safe
28+ | ^^^^ not FFI-safe
2929 |
3030 = help: consider using a raw pointer instead
3131 = note: slices have no C equivalent
3232
3333error: `extern` callback uses type `[u8]`, which is not FFI-safe
34- --> $DIR/lint-94223.rs:11:18
34+ --> $DIR/lint-94223.rs:11:32
3535 |
3636LL | struct BadStruct(extern "C" fn([u8]));
37- | ^^^^^^^^^^^^^^^ ^^^^ not FFI-safe
37+ | ^^^^ not FFI-safe
3838 |
3939 = help: consider using a raw pointer instead
4040 = note: slices have no C equivalent
4141
4242error: `extern` callback uses type `[u8]`, which is not FFI-safe
43- --> $DIR/lint-94223.rs:15:7
43+ --> $DIR/lint-94223.rs:15:21
4444 |
4545LL | A(extern "C" fn([u8])),
46- | ^^^^^^^^^^^^^^^ ^^^^ not FFI-safe
46+ | ^^^^ not FFI-safe
4747 |
4848 = help: consider using a raw pointer instead
4949 = note: slices have no C equivalent
5050
5151error: `extern` callback uses type `[u8]`, which is not FFI-safe
52- --> $DIR/lint-94223.rs:20:7
52+ --> $DIR/lint-94223.rs:20:21
5353 |
5454LL | A(extern "C" fn([u8])),
55- | ^^^^^^^^^^^^^^^ ^^^^ not FFI-safe
55+ | ^^^^ not FFI-safe
5656 |
5757 = help: consider using a raw pointer instead
5858 = note: slices have no C equivalent
5959
6060error: `extern` callback uses type `[u8]`, which is not FFI-safe
61- --> $DIR/lint-94223.rs:24:12
61+ --> $DIR/lint-94223.rs:24:26
6262 |
6363LL | type Foo = extern "C" fn([u8]);
64- | ^^^^^^^^^^^^^^^ ^^^^ not FFI-safe
64+ | ^^^^ not FFI-safe
6565 |
6666 = help: consider using a raw pointer instead
6767 = note: slices have no C equivalent
6868
6969error: `extern` callback uses type `Option<&<T as FooTrait>::FooType>`, which is not FFI-safe
70- --> $DIR/lint-94223.rs:31:20
70+ --> $DIR/lint-94223.rs:31:34
7171 |
7272LL | pub type Foo2<T> = extern "C" fn(Option<&<T as FooTrait>::FooType>);
73- | ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
73+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
7474 |
7575 = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
7676 = note: enum has no representation hint
7777
7878error: `extern` callback uses type `FfiUnsafe`, which is not FFI-safe
79- --> $DIR/lint-94223.rs:41:17
79+ --> $DIR/lint-94223.rs:41:31
8080 |
8181LL | pub static BAD: extern "C" fn(FfiUnsafe) = f;
82- | ^^^^^^^^^^^^^^^ ^^^^^^^^^ not FFI-safe
82+ | ^^^^^^^^^ not FFI-safe
8383 |
8484 = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
8585 = note: this struct has unspecified layout
@@ -90,10 +90,10 @@ LL | pub struct FfiUnsafe;
9090 | ^^^^^^^^^^^^^^^^^^^^
9191
9292error: `extern` callback uses type `FfiUnsafe`, which is not FFI-safe
93- --> $DIR/lint-94223.rs:44:30
93+ --> $DIR/lint-94223.rs:44:44
9494 |
9595LL | pub static BAD_TWICE: Result<extern "C" fn(FfiUnsafe), extern "C" fn(FfiUnsafe)> = Ok(f);
96- | ^^^^^^^^^^^^^^^ ^^^^^^^^^ not FFI-safe
96+ | ^^^^^^^^^ not FFI-safe
9797 |
9898 = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
9999 = note: this struct has unspecified layout
@@ -104,10 +104,10 @@ LL | pub struct FfiUnsafe;
104104 | ^^^^^^^^^^^^^^^^^^^^
105105
106106error: `extern` callback uses type `FfiUnsafe`, which is not FFI-safe
107- --> $DIR/lint-94223.rs:44:56
107+ --> $DIR/lint-94223.rs:44:70
108108 |
109109LL | pub static BAD_TWICE: Result<extern "C" fn(FfiUnsafe), extern "C" fn(FfiUnsafe)> = Ok(f);
110- | ^^^^^^^^^^^^^^^ ^^^^^^^^^ not FFI-safe
110+ | ^^^^^^^^^ not FFI-safe
111111 |
112112 = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
113113 = note: this struct has unspecified layout
@@ -118,10 +118,10 @@ LL | pub struct FfiUnsafe;
118118 | ^^^^^^^^^^^^^^^^^^^^
119119
120120error: `extern` callback uses type `FfiUnsafe`, which is not FFI-safe
121- --> $DIR/lint-94223.rs:48:22
121+ --> $DIR/lint-94223.rs:48:36
122122 |
123123LL | pub const BAD_CONST: extern "C" fn(FfiUnsafe) = f;
124- | ^^^^^^^^^^^^^^^ ^^^^^^^^^ not FFI-safe
124+ | ^^^^^^^^^ not FFI-safe
125125 |
126126 = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
127127 = note: this struct has unspecified layout
0 commit comments