blob: 434711b75236e52797c839126e323f880436a66c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
extern "C" {
fn foo(a: i32, ...);
}
fn bar(_: *const u8) {}
fn main() {
unsafe {
foo(0, bar);
//~^ 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
}
}
|