Skip to content

Commit de78c32

Browse files
committed
Cleanup message and bless tests
1 parent 65ef625 commit de78c32

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

Diff for: compiler/rustc_hir_analysis/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ fn require_c_abi_if_c_variadic(tcx: TyCtxt<'_>, decl: &hir::FnDecl<'_>, abi: Abi
122122
const CONVENTIONS_UNSTABLE: &str = "`C`, `cdecl`, `win64`, `sysv64` or `efiapi`";
123123
const CONVENTIONS_STABLE: &str = "`C` or `cdecl`";
124124
const UNSTABLE_EXPLAIN: &str =
125-
"using different calling convention than `C` or `cdecl` for varargs functions is unstable";
125+
"using calling conventions other than `C` or `cdecl` for varargs functions is unstable";
126126

127127
if !decl.c_variadic || matches!(abi, Abi::C { .. } | Abi::Cdecl { .. }) {
128128
return;

Diff for: src/test/ui/c-variadic/feature-gate-extended_varargs_abi_support.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
#![feature(abi_efiapi)]
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 different calling convention than C or cdecl for varargs functions is unstable
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
66
f(22, 44);
77
}
88
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 different calling convention than C or cdecl for varargs functions is unstable
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
1111
f(22, 44);
1212
}
1313
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 different calling convention than C or cdecl for varargs functions is unstable
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
1616
f(22, 44);
1717
}
1818

Diff for: src/test/ui/c-variadic/feature-gate-extended_varargs_abi_support.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0658]: using different calling convention than C or cdecl for varargs functions is unstable
1+
error[E0658]: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
22
--> $DIR/feature-gate-extended_varargs_abi_support.rs:3:14
33
|
44
LL | fn efiapi(f: extern "efiapi" fn(usize, ...)) {
@@ -7,13 +7,13 @@ LL | fn efiapi(f: extern "efiapi" fn(usize, ...)) {
77
= note: see issue #100189 <https://github.com/rust-lang/rust/issues/100189> for more information
88
= help: add `#![feature(extended_varargs_abi_support)]` to the crate attributes to enable
99

10-
error[E0045]: C-variadic function must have a compatible calling convention, like C or cdecl
10+
error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
1111
--> $DIR/feature-gate-extended_varargs_abi_support.rs:3:14
1212
|
1313
LL | fn efiapi(f: extern "efiapi" fn(usize, ...)) {
1414
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
1515

16-
error[E0658]: using different calling convention than C or cdecl for varargs functions is unstable
16+
error[E0658]: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
1717
--> $DIR/feature-gate-extended_varargs_abi_support.rs:8:12
1818
|
1919
LL | fn sysv(f: extern "sysv64" fn(usize, ...)) {
@@ -22,13 +22,13 @@ LL | fn sysv(f: extern "sysv64" fn(usize, ...)) {
2222
= note: see issue #100189 <https://github.com/rust-lang/rust/issues/100189> for more information
2323
= help: add `#![feature(extended_varargs_abi_support)]` to the crate attributes to enable
2424

25-
error[E0045]: C-variadic function must have a compatible calling convention, like C or cdecl
25+
error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
2626
--> $DIR/feature-gate-extended_varargs_abi_support.rs:8:12
2727
|
2828
LL | fn sysv(f: extern "sysv64" fn(usize, ...)) {
2929
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
3030

31-
error[E0658]: using different calling convention than C or cdecl for varargs functions is unstable
31+
error[E0658]: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
3232
--> $DIR/feature-gate-extended_varargs_abi_support.rs:13:11
3333
|
3434
LL | fn win(f: extern "win64" fn(usize, ...)) {
@@ -37,7 +37,7 @@ LL | fn win(f: extern "win64" fn(usize, ...)) {
3737
= note: see issue #100189 <https://github.com/rust-lang/rust/issues/100189> for more information
3838
= help: add `#![feature(extended_varargs_abi_support)]` to the crate attributes to enable
3939

40-
error[E0045]: C-variadic function must have a compatible calling convention, like C or cdecl
40+
error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
4141
--> $DIR/feature-gate-extended_varargs_abi_support.rs:13:11
4242
|
4343
LL | fn win(f: extern "win64" fn(usize, ...)) {

Diff for: src/test/ui/c-variadic/variadic-ffi-1.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 or cdecl
1+
error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
22
--> $DIR/variadic-ffi-1.rs:9:5
33
|
44
LL | fn printf(_: *const u8, ...);

Diff for: src/test/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, win64, sysv64 or efiapi
1+
error[E0045]: C-variadic function must have a compatible calling convention, like `C`, `cdecl`, `win64`, `sysv64` or `efiapi`
22
--> $DIR/variadic-ffi-2.rs:5:11
33
|
44
LL | fn baz(f: extern "stdcall" fn(usize, ...)) {

Diff for: src/test/ui/error-codes/E0045.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 or cdecl
1+
error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
22
--> $DIR/E0045.rs:1:17
33
|
44
LL | extern "Rust" { fn foo(x: u8, ...); }

0 commit comments

Comments
 (0)