mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
14 lines
245 B
Rust
14 lines
245 B
Rust
extern "C" {
|
|
fn foo(a: i32, ...);
|
|
}
|
|
|
|
fn bar(_: *const u8) {}
|
|
|
|
fn main() {
|
|
unsafe {
|
|
foo(0, bar);
|
|
//~^ ERROR can't pass `fn(*const u8) {bar}` to variadic function
|
|
//~| HELP cast the value to `fn(*const u8)`
|
|
}
|
|
}
|