mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
16 lines
445 B
Rust
16 lines
445 B
Rust
// issue: rust-lang/rust#80125
|
|
//@ check-pass
|
|
type ExternCallback = extern "C" fn(*const u8, u32, str);
|
|
//~^ WARN `extern` fn uses type `str`, which is not FFI-safe
|
|
|
|
pub struct Struct(ExternCallback);
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn register_something(bind: ExternCallback) -> Struct {
|
|
//~^ WARN `extern` fn uses type `str`, which is not FFI-safe
|
|
//~^^ WARN `extern` fn uses type `Struct`, which is not FFI-safe
|
|
Struct(bind)
|
|
}
|
|
|
|
fn main() {}
|