Skip to content

Commit ab4ad6b

Browse files
committed
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.
1 parent e6d3987 commit ab4ad6b

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

tests/ui/c-variadic/variadic-ffi-2.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
//@ ignore-arm stdcall isn't supported
2-
//@ ignore-x86 stdcall isn't supported
31
#![feature(extended_varargs_abi_support)]
42

5-
#[allow(unsupported_fn_ptr_calling_conventions)]
6-
fn baz(f: extern "stdcall" fn(usize, ...)) {
3+
fn baz(f: extern "Rust" fn(usize, ...)) {
74
//~^ ERROR: C-variadic function must have a compatible calling convention,
85
// like C, cdecl, system, aapcs, win64, sysv64 or efiapi
96
f(22, 44);
+3-13
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
11
error[E0045]: C-variadic function must have a compatible calling convention, like `C`, `cdecl`, `system`, `aapcs`, `win64`, `sysv64` or `efiapi`
2-
--> $DIR/variadic-ffi-2.rs:6:11
2+
--> $DIR/variadic-ffi-2.rs:3:11
33
|
4-
LL | fn baz(f: extern "stdcall" fn(usize, ...)) {
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
4+
LL | fn baz(f: extern "Rust" fn(usize, ...)) {
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
66

77
error: aborting due to 1 previous error
88

99
For more information about this error, try `rustc --explain E0045`.
10-
Future incompatibility report: Future breakage diagnostic:
11-
warning: the calling convention "stdcall" is not supported on this target
12-
--> $DIR/variadic-ffi-2.rs:6:11
13-
|
14-
LL | fn baz(f: extern "stdcall" fn(usize, ...)) {
15-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16-
|
17-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
18-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
19-

0 commit comments

Comments
 (0)