rust/tests/ui/feature-gates/feature-gate-c_variadic.rs
Folkert de Vries a093372e5e
disallow c-variadic associated functions (for now)
there is no reason this should not work, really, we're just cutting some scope for now
2025-09-08 18:41:22 +02:00

11 lines
316 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
//~| ERROR associated functions cannot have a C variable argument list
}