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);
|
2024-11-27 15:37:27 +01:00
|
|
|
//~^ ERROR can't pass a function item to a variadic function
|
|
|
|
|
//~| HELP a function item is zero-sized and needs to be cast into a function pointer to be used in FFI
|
|
|
|
|
////~| HELP use a function pointer instead
|
2016-04-08 08:13:29 +03:00
|
|
|
}
|
|
|
|
|
}
|