mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 22:12:15 +00:00
17 lines
450 B
Rust
17 lines
450 B
Rust
// test for ICE when casting extern "C" fn when it has a non-FFI-safe argument
|
|
// issue: rust-lang/rust#52334
|
|
//@ check-pass
|
|
//@ normalize-stderr-test: "\[i8\]" -> "[i8 or u8 (arch dependant)]"
|
|
//@ normalize-stderr-test: "\[u8\]" -> "[i8 or u8 (arch dependant)]"
|
|
|
|
type Foo = extern "C" fn(::std::ffi::CStr);
|
|
//~^ WARN `extern` fn uses type
|
|
extern "C" {
|
|
fn meh(blah: Foo);
|
|
//~^ WARN `extern` block uses type
|
|
}
|
|
|
|
fn main() {
|
|
meh as usize;
|
|
}
|