Skip to content

Commit da4a1e6

Browse files
accept diffs
1 parent fa688b8 commit da4a1e6

5 files changed

+10
-40
lines changed

tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
//@ only-x86_64
22

33
fn efiapi(f: extern "efiapi" fn(usize, ...)) {
4-
//~^ ERROR: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
5-
//~^^ ERROR: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
4+
//~^ ERROR: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
65
f(22, 44);
76
}
87
fn sysv(f: extern "sysv64" fn(usize, ...)) {
9-
//~^ ERROR: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
10-
//~^^ ERROR: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
8+
//~^ ERROR: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
119
f(22, 44);
1210
}
1311
fn win(f: extern "win64" fn(usize, ...)) {
14-
//~^ ERROR: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
15-
//~^^ ERROR: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
12+
//~^ ERROR: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
1613
f(22, 44);
1714
}
1815

tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.stderr

+4-23
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,8 @@ LL | fn efiapi(f: extern "efiapi" fn(usize, ...)) {
88
= help: add `#![feature(extended_varargs_abi_support)]` to the crate attributes to enable
99
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
1010

11-
error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
12-
--> $DIR/feature-gate-extended_varargs_abi_support.rs:3:14
13-
|
14-
LL | fn efiapi(f: extern "efiapi" fn(usize, ...)) {
15-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
16-
1711
error[E0658]: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
18-
--> $DIR/feature-gate-extended_varargs_abi_support.rs:8:12
12+
--> $DIR/feature-gate-extended_varargs_abi_support.rs:7:12
1913
|
2014
LL | fn sysv(f: extern "sysv64" fn(usize, ...)) {
2115
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -24,14 +18,8 @@ LL | fn sysv(f: extern "sysv64" fn(usize, ...)) {
2418
= help: add `#![feature(extended_varargs_abi_support)]` to the crate attributes to enable
2519
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
2620

27-
error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
28-
--> $DIR/feature-gate-extended_varargs_abi_support.rs:8:12
29-
|
30-
LL | fn sysv(f: extern "sysv64" fn(usize, ...)) {
31-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
32-
3321
error[E0658]: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
34-
--> $DIR/feature-gate-extended_varargs_abi_support.rs:13:11
22+
--> $DIR/feature-gate-extended_varargs_abi_support.rs:11:11
3523
|
3624
LL | fn win(f: extern "win64" fn(usize, ...)) {
3725
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -40,13 +28,6 @@ LL | fn win(f: extern "win64" fn(usize, ...)) {
4028
= help: add `#![feature(extended_varargs_abi_support)]` to the crate attributes to enable
4129
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
4230

43-
error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
44-
--> $DIR/feature-gate-extended_varargs_abi_support.rs:13:11
45-
|
46-
LL | fn win(f: extern "win64" fn(usize, ...)) {
47-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
48-
49-
error: aborting due to 6 previous errors
31+
error: aborting due to 3 previous errors
5032

51-
Some errors have detailed explanations: E0045, E0658.
52-
For more information about an error, try `rustc --explain E0045`.
33+
For more information about this error, try `rustc --explain E0658`.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0045]: C-variadic function must have a compatible calling convention, like `C`, `cdecl`, `system`, `aapcs`, `win64`, `sysv64` or `efiapi`
1+
error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
22
--> $DIR/variadic-ffi-2.rs:5:11
33
|
44
LL | fn baz(f: extern "stdcall" fn(usize, ...)) {

tests/ui/feature-gates/feature-gate-extern_system_varargs.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
fn system(f: extern "system" fn(usize, ...)) {
22
//~^ ERROR using calling conventions other than `C` or `cdecl` for varargs functions is unstable
3-
//~| ERROR C-variadic function must have a compatible calling convention, like `C` or `cdecl`
43

54
f(22, 44);
65
}

tests/ui/feature-gates/feature-gate-extern_system_varargs.stderr

+2-9
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@ LL | fn system(f: extern "system" fn(usize, ...)) {
88
= help: add `#![feature(extern_system_varargs)]` to the crate attributes to enable
99
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
1010

11-
error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
12-
--> $DIR/feature-gate-extern_system_varargs.rs:1:14
13-
|
14-
LL | fn system(f: extern "system" fn(usize, ...)) {
15-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
16-
17-
error: aborting due to 2 previous errors
11+
error: aborting due to 1 previous error
1812

19-
Some errors have detailed explanations: E0045, E0658.
20-
For more information about an error, try `rustc --explain E0045`.
13+
For more information about this error, try `rustc --explain E0658`.

0 commit comments

Comments
 (0)