diff options
| author | Tamme Dittrich <tamme@tweedegolf.com> | 2025-02-18 15:00:26 +0100 |
|---|---|---|
| committer | Tamme Dittrich <tamme@tweedegolf.com> | 2025-03-03 08:52:07 +0100 |
| commit | 310f837fd56d52d20bdcd00b7f89967455570fc0 (patch) | |
| tree | 177b8885d3713e1c5631fe738cb97da336482bc0 | |
| parent | 2bf5cc93e6421fdc5cfd83912d152b6712aadb56 (diff) | |
| download | rust-310f837fd56d52d20bdcd00b7f89967455570fc0.tar.gz rust-310f837fd56d52d20bdcd00b7f89967455570fc0.zip | |
Change variadic-ffi-2 to use a platform independant ABI
Otherwise this test will include a future incompatibility warning on some targets but not others.
| -rw-r--r-- | tests/ui/c-variadic/variadic-ffi-2.rs | 5 | ||||
| -rw-r--r-- | tests/ui/c-variadic/variadic-ffi-2.stderr | 16 |
2 files changed, 4 insertions, 17 deletions
diff --git a/tests/ui/c-variadic/variadic-ffi-2.rs b/tests/ui/c-variadic/variadic-ffi-2.rs index 7b46f579240..da7bb76fc14 100644 --- a/tests/ui/c-variadic/variadic-ffi-2.rs +++ b/tests/ui/c-variadic/variadic-ffi-2.rs @@ -1,9 +1,6 @@ -//@ ignore-arm stdcall isn't supported -//@ ignore-x86 stdcall isn't supported #![feature(extended_varargs_abi_support)] -#[allow(unsupported_fn_ptr_calling_conventions)] -fn baz(f: extern "stdcall" fn(usize, ...)) { +fn baz(f: extern "Rust" fn(usize, ...)) { //~^ ERROR: C-variadic function must have a compatible calling convention, // like C, cdecl, system, aapcs, win64, sysv64 or efiapi f(22, 44); diff --git a/tests/ui/c-variadic/variadic-ffi-2.stderr b/tests/ui/c-variadic/variadic-ffi-2.stderr index 56cc4936219..9f8dcefdb03 100644 --- a/tests/ui/c-variadic/variadic-ffi-2.stderr +++ b/tests/ui/c-variadic/variadic-ffi-2.stderr @@ -1,19 +1,9 @@ error[E0045]: C-variadic function must have a compatible calling convention, like `C`, `cdecl`, `system`, `aapcs`, `win64`, `sysv64` or `efiapi` - --> $DIR/variadic-ffi-2.rs:6:11 + --> $DIR/variadic-ffi-2.rs:3:11 | -LL | fn baz(f: extern "stdcall" fn(usize, ...)) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention +LL | fn baz(f: extern "Rust" fn(usize, ...)) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0045`. -Future incompatibility report: Future breakage diagnostic: -warning: the calling convention "stdcall" is not supported on this target - --> $DIR/variadic-ffi-2.rs:6:11 - | -LL | fn baz(f: extern "stdcall" fn(usize, ...)) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260> - |
