mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-28 13:46:03 +00:00

Revert <https://github.com/rust-lang/rust/pull/131669> due to ICE reports: - <https://github.com/rust-lang/rust/issues/134059> (real-world) - <https://github.com/rust-lang/rust/issues/134060> (fuzzing) The changes can be re-landed with those cases addressed. This reverts commit 703bb982303ecab02fec593899639b4c3faecddd, reversing changes made to f415c07494b98e4559e4b13a9c5f867b0e6b2444.
23 lines
880 B
Plaintext
23 lines
880 B
Plaintext
warning: `extern` fn uses type `CStr`, which is not FFI-safe
|
|
--> $DIR/extern-C-non-FFI-safe-arg-ice-52334.rs:7:12
|
|
|
|
|
LL | type Foo = extern "C" fn(::std::ffi::CStr);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider passing a `*const std::ffi::c_char` instead, and use `CStr::as_ptr()`
|
|
= note: `CStr`/`CString` do not have a guaranteed layout
|
|
= note: `#[warn(improper_ctypes_definitions)]` on by default
|
|
|
|
warning: `extern` block uses type `CStr`, which is not FFI-safe
|
|
--> $DIR/extern-C-non-FFI-safe-arg-ice-52334.rs:10:18
|
|
|
|
|
LL | fn meh(blah: Foo);
|
|
| ^^^ not FFI-safe
|
|
|
|
|
= help: consider passing a `*const std::ffi::c_char` instead, and use `CStr::as_ptr()`
|
|
= note: `CStr`/`CString` do not have a guaranteed layout
|
|
= note: `#[warn(improper_ctypes)]` on by default
|
|
|
|
warning: 2 warnings emitted
|
|
|