but a C-variadic method makes a trait dyn-incompatible. That is because methods from dyn traits, when cast to a function pointer, create a shim. That shim can't really forward the c-variadic arguments.
10 lines
241 B
Rust
10 lines
241 B
Rust
#![crate_type = "lib"]
|
|
|
|
pub unsafe extern "C" fn test(_: i32, ap: ...) {}
|
|
//~^ ERROR C-variadic functions are unstable
|
|
|
|
trait Trait {
|
|
unsafe extern "C" fn trait_test(_: i32, ap: ...) {}
|
|
//~^ ERROR C-variadic functions are unstable
|
|
}
|