about summary refs log tree commit diff
path: root/tests/ui/c-variadic
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/c-variadic')
-rw-r--r--tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.rs16
-rw-r--r--tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.stderr33
-rw-r--r--tests/ui/c-variadic/issue-86053-1.rs2
-rw-r--r--tests/ui/c-variadic/issue-86053-1.stderr2
-rw-r--r--tests/ui/c-variadic/same-program-multiple-abis-arm.rs1
-rw-r--r--tests/ui/c-variadic/same-program-multiple-abis-x86_64.rs1
6 files changed, 2 insertions, 53 deletions
diff --git a/tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.rs b/tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.rs
deleted file mode 100644
index 1e0576b2186..00000000000
--- a/tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-//@ only-x86_64
-
-fn efiapi(f: extern "efiapi" fn(usize, ...)) {
-    //~^ ERROR: unstable
-    f(22, 44);
-}
-fn sysv(f: extern "sysv64" fn(usize, ...)) {
-    //~^ ERROR: unstable
-    f(22, 44);
-}
-fn win(f: extern "win64" fn(usize, ...)) {
-    //~^ ERROR: unstable
-    f(22, 44);
-}
-
-fn main() {}
diff --git a/tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.stderr b/tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.stderr
deleted file mode 100644
index 7ef54b639ad..00000000000
--- a/tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.stderr
+++ /dev/null
@@ -1,33 +0,0 @@
-error[E0658]: C-variadic functions with the "efiapi" calling convention are unstable
-  --> $DIR/feature-gate-extended_varargs_abi_support.rs:3:14
-   |
-LL | fn efiapi(f: extern "efiapi" fn(usize, ...)) {
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #100189 <https://github.com/rust-lang/rust/issues/100189> for more information
-   = help: add `#![feature(extended_varargs_abi_support)]` to the crate attributes to enable
-   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
-
-error[E0658]: C-variadic functions with the "sysv64" calling convention are unstable
-  --> $DIR/feature-gate-extended_varargs_abi_support.rs:7:12
-   |
-LL | fn sysv(f: extern "sysv64" fn(usize, ...)) {
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #100189 <https://github.com/rust-lang/rust/issues/100189> for more information
-   = help: add `#![feature(extended_varargs_abi_support)]` to the crate attributes to enable
-   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
-
-error[E0658]: C-variadic functions with the "win64" calling convention are unstable
-  --> $DIR/feature-gate-extended_varargs_abi_support.rs:11:11
-   |
-LL | fn win(f: extern "win64" fn(usize, ...)) {
-   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #100189 <https://github.com/rust-lang/rust/issues/100189> for more information
-   = help: add `#![feature(extended_varargs_abi_support)]` to the crate attributes to enable
-   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/c-variadic/issue-86053-1.rs b/tests/ui/c-variadic/issue-86053-1.rs
index 8eeb99a4cc1..537d0263adf 100644
--- a/tests/ui/c-variadic/issue-86053-1.rs
+++ b/tests/ui/c-variadic/issue-86053-1.rs
@@ -13,6 +13,6 @@ fn ordering4 < 'a , 'b     > ( a :            ,   self , self ,   self ,
     //~| ERROR unexpected `self` parameter in function
     //~| ERROR unexpected `self` parameter in function
     //~| ERROR `...` must be the last argument of a C-variadic function
-    //~| ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
+    //~| ERROR defining functions with C-variadic arguments is only allowed for free functions with the "C" or "C-unwind" calling convention
     //~| ERROR cannot find type `F` in this scope
 }
diff --git a/tests/ui/c-variadic/issue-86053-1.stderr b/tests/ui/c-variadic/issue-86053-1.stderr
index dc323f9a234..472295c92b9 100644
--- a/tests/ui/c-variadic/issue-86053-1.stderr
+++ b/tests/ui/c-variadic/issue-86053-1.stderr
@@ -46,7 +46,7 @@ error: `...` must be the last argument of a C-variadic function
 LL |     self , ... ,   self ,   self , ... ) where F : FnOnce ( & 'a & 'b usize ) {
    |            ^^^
 
-error: only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
+error: defining functions with C-variadic arguments is only allowed for free functions with the "C" or "C-unwind" calling convention
   --> $DIR/issue-86053-1.rs:11:12
    |
 LL |     self , ... ,   self ,   self , ... ) where F : FnOnce ( & 'a & 'b usize ) {
diff --git a/tests/ui/c-variadic/same-program-multiple-abis-arm.rs b/tests/ui/c-variadic/same-program-multiple-abis-arm.rs
index 1b0bdecabfb..1445bbb47bb 100644
--- a/tests/ui/c-variadic/same-program-multiple-abis-arm.rs
+++ b/tests/ui/c-variadic/same-program-multiple-abis-arm.rs
@@ -1,4 +1,3 @@
-#![feature(extended_varargs_abi_support)]
 //@ run-pass
 //@ only-arm
 //@ ignore-thumb (this test uses arm assembly)
diff --git a/tests/ui/c-variadic/same-program-multiple-abis-x86_64.rs b/tests/ui/c-variadic/same-program-multiple-abis-x86_64.rs
index b21accb999e..aff8ab613c4 100644
--- a/tests/ui/c-variadic/same-program-multiple-abis-x86_64.rs
+++ b/tests/ui/c-variadic/same-program-multiple-abis-x86_64.rs
@@ -1,4 +1,3 @@
-#![feature(extended_varargs_abi_support)]
 //@ run-pass
 //@ only-x86_64