2024-03-23 09:49:05 -05:00
|
|
|
warning: `extern` fn uses type `CStr`, which is not FFI-safe
|
2024-03-22 13:21:50 -05:00
|
|
|
--> $DIR/extern-C-non-FFI-safe-arg-ice-52334.rs:7:12
|
2024-03-22 11:49:04 -05:00
|
|
|
|
|
|
|
|
LL | type Foo = extern "C" fn(::std::ffi::CStr);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
|
2024-03-23 09:49:05 -05:00
|
|
|
= help: consider passing a `*const std::ffi::c_char` instead, and use `CStr::as_ptr()`
|
|
|
|
= note: `CStr`/`CString` do not have a guaranteed layout
|
2024-03-22 11:49:04 -05:00
|
|
|
= note: `#[warn(improper_ctypes_definitions)]` on by default
|
|
|
|
|
2024-03-23 09:49:05 -05:00
|
|
|
warning: `extern` block uses type `CStr`, which is not FFI-safe
|
2024-03-22 13:21:50 -05:00
|
|
|
--> $DIR/extern-C-non-FFI-safe-arg-ice-52334.rs:10:18
|
2024-03-22 11:49:04 -05:00
|
|
|
|
|
|
|
|
LL | fn meh(blah: Foo);
|
|
|
|
| ^^^ not FFI-safe
|
|
|
|
|
|
2024-03-23 09:49:05 -05:00
|
|
|
= help: consider passing a `*const std::ffi::c_char` instead, and use `CStr::as_ptr()`
|
|
|
|
= note: `CStr`/`CString` do not have a guaranteed layout
|
2024-03-22 11:49:04 -05:00
|
|
|
= note: `#[warn(improper_ctypes)]` on by default
|
|
|
|
|
|
|
|
warning: 2 warnings emitted
|
|
|
|
|