rust/tests/ui/abi/issue-94223.rs
David Wood eddfce53c1
abi: avoid ice for non-ffi-safe fn ptrs
Remove an `unwrap` that assumed FFI-safe types in foreign fn-ptr types.

Signed-off-by: David Wood <david.wood@huawei.com>
2023-07-03 13:40:20 +01:00

8 lines
228 B
Rust

// check-pass
#![allow(improper_ctypes_definitions)]
#![crate_type = "lib"]
// Check that computing the fn abi for `bad`, with a external ABI fn ptr that is not FFI-safe, does
// not ICE.
pub fn bad(f: extern "C" fn([u8])) {}