Closed
Description
While the following code gets rejected:
#![feature(c_variadic)]
struct S;
impl S {
unsafe extern "C" fn f(...) {}
//~^ ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
}
The code below doesn't:
#![feature(c_variadic, fn_delegation)]
struct S;
unsafe extern "C" fn f(...) {}
impl S {
reuse f;
}
And yes, S::f
does "appear to behave variadic". I'm not a C-FFI or ABI expert, so I guess it's for a very good reason that variadic associated functions generally get rejected.