about summary refs log tree commit diff
path: root/tests/ui/extern/extern-C-non-FFI-safe-arg-ice-52334.rs
blob: 33d295f7ebe19d116bef2aed43a57031212558ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// 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: "\[i8\]" -> "[i8 or u8 (arch dependant)]"
//@ normalize-stderr: "\[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;
}