summaryrefslogtreecommitdiffstats
path: root/src/test/ui/c-variadic/variadic-ffi-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/c-variadic/variadic-ffi-2.rs')
-rw-r--r--src/test/ui/c-variadic/variadic-ffi-2.rs15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/test/ui/c-variadic/variadic-ffi-2.rs b/src/test/ui/c-variadic/variadic-ffi-2.rs
index 224ac16f4..96cea8754 100644
--- a/src/test/ui/c-variadic/variadic-ffi-2.rs
+++ b/src/test/ui/c-variadic/variadic-ffi-2.rs
@@ -1,7 +1,20 @@
// ignore-arm stdcall isn't supported
+#![feature(extended_varargs_abi_support)]
+#![feature(abi_efiapi)]
fn baz(f: extern "stdcall" fn(usize, ...)) {
- //~^ ERROR: variadic function must have C or cdecl calling convention
+ //~^ ERROR: C-variadic function must have a compatible calling convention,
+ // like C, cdecl, win64, sysv64 or efiapi
+ f(22, 44);
+}
+
+fn sysv(f: extern "sysv64" fn(usize, ...)) {
+ f(22, 44);
+}
+fn win(f: extern "win64" fn(usize, ...)) {
+ f(22, 44);
+}
+fn efiapi(f: extern "efiapi" fn(usize, ...)) {
f(22, 44);
}