about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorMark Simulacrum <mark.simulacrum@gmail.com>2017-05-26 10:54:56 -0600
committerMark Simulacrum <mark.simulacrum@gmail.com>2017-05-27 06:03:50 -0600
commitbf87e17cd67805e3d1e5f422c4e8fa2b0e9a3ae7 (patch)
treef5a78ebb738e68c1f39b4a4bfbc61ac547a55a32 /src/test
parentc732446eddeb2d387763c7974d7e78217e44519a (diff)
downloadrust-bf87e17cd67805e3d1e5f422c4e8fa2b0e9a3ae7.tar.gz
rust-bf87e17cd67805e3d1e5f422c4e8fa2b0e9a3ae7.zip
Allow variadic functions with cdecl calling convention.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/E0045.rs2
-rw-r--r--src/test/compile-fail/variadic-ffi-2.rs6
-rw-r--r--src/test/compile-fail/variadic-ffi.rs6
3 files changed, 9 insertions, 5 deletions
diff --git a/src/test/compile-fail/E0045.rs b/src/test/compile-fail/E0045.rs
index a3fea8e0db2..3f098861eb6 100644
--- a/src/test/compile-fail/E0045.rs
+++ b/src/test/compile-fail/E0045.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 extern "Rust" { fn foo(x: u8, ...); }   //~ ERROR E0045
-                                        //~| NOTE variadics require C calling conventions
+                                        //~| NOTE variadics require C or cdecl calling convention
 
 fn main() {
 }
diff --git a/src/test/compile-fail/variadic-ffi-2.rs b/src/test/compile-fail/variadic-ffi-2.rs
index afcad9d8f96..ec5669f6392 100644
--- a/src/test/compile-fail/variadic-ffi-2.rs
+++ b/src/test/compile-fail/variadic-ffi-2.rs
@@ -8,8 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn baz(f: extern "cdecl" fn(usize, ...)) {
-    //~^ ERROR: variadic function must have C calling convention
+// ignore-arm stdcall isn't suppported
+
+fn baz(f: extern "stdcall" fn(usize, ...)) {
+    //~^ ERROR: variadic function must have C or cdecl calling convention
     f(22, 44);
 }
 
diff --git a/src/test/compile-fail/variadic-ffi.rs b/src/test/compile-fail/variadic-ffi.rs
index af2b552e20f..125177efc53 100644
--- a/src/test/compile-fail/variadic-ffi.rs
+++ b/src/test/compile-fail/variadic-ffi.rs
@@ -8,8 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-extern "cdecl" {
-    fn printf(_: *const u8, ...); //~ ERROR: variadic function must have C calling convention
+// ignore-arm stdcall isn't suppported
+
+extern "stdcall" {
+    fn printf(_: *const u8, ...); //~ ERROR: variadic function must have C or cdecl calling
 }
 
 extern {