]> git.proxmox.com Git - rustc.git/blob - tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / c-variadic / feature-gate-extended_varargs_abi_support.rs
1 fn efiapi(f: extern "efiapi" fn(usize, ...)) {
2 //~^ ERROR: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
3 //~^^ ERROR: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
4 f(22, 44);
5 }
6 fn sysv(f: extern "sysv64" fn(usize, ...)) {
7 //~^ ERROR: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
8 //~^^ ERROR: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
9 f(22, 44);
10 }
11 fn win(f: extern "win64" fn(usize, ...)) {
12 //~^ ERROR: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
13 //~^^ ERROR: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
14 f(22, 44);
15 }
16
17 fn main() {}