2020-09-01 17:12:52 -04:00
|
|
|
extern "C" {
|
2016-04-08 08:13:29 +03:00
|
|
|
fn foo(a: i32, ...);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn bar(_: *const u8) {}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
unsafe {
|
|
|
|
foo(0, bar);
|
2018-01-22 08:35:21 -08:00
|
|
|
//~^ ERROR can't pass `fn(*const u8) {bar}` to variadic function
|
|
|
|
//~| HELP cast the value to `fn(*const u8)`
|
2016-04-08 08:13:29 +03:00
|
|
|
}
|
|
|
|
}
|