1
Fork 0

Cleanup message and bless tests

This commit is contained in:
Jack Huey 2022-10-23 19:11:25 -04:00
parent 65ef62597b
commit de78c32b85
6 changed files with 16 additions and 16 deletions

View file

@ -122,7 +122,7 @@ fn require_c_abi_if_c_variadic(tcx: TyCtxt<'_>, decl: &hir::FnDecl<'_>, abi: Abi
const CONVENTIONS_UNSTABLE: &str = "`C`, `cdecl`, `win64`, `sysv64` or `efiapi`"; const CONVENTIONS_UNSTABLE: &str = "`C`, `cdecl`, `win64`, `sysv64` or `efiapi`";
const CONVENTIONS_STABLE: &str = "`C` or `cdecl`"; const CONVENTIONS_STABLE: &str = "`C` or `cdecl`";
const UNSTABLE_EXPLAIN: &str = const UNSTABLE_EXPLAIN: &str =
"using different calling convention than `C` or `cdecl` for varargs functions is unstable"; "using calling conventions other than `C` or `cdecl` for varargs functions is unstable";
if !decl.c_variadic || matches!(abi, Abi::C { .. } | Abi::Cdecl { .. }) { if !decl.c_variadic || matches!(abi, Abi::C { .. } | Abi::Cdecl { .. }) {
return; return;

View file

@ -1,18 +1,18 @@
#![feature(abi_efiapi)] #![feature(abi_efiapi)]
fn efiapi(f: extern "efiapi" fn(usize, ...)) { fn efiapi(f: extern "efiapi" fn(usize, ...)) {
//~^ ERROR: C-variadic function must have a compatible calling convention, like C or cdecl //~^ ERROR: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
//~^^ ERROR: using different calling convention than C or cdecl for varargs functions is unstable //~^^ ERROR: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
f(22, 44); f(22, 44);
} }
fn sysv(f: extern "sysv64" fn(usize, ...)) { fn sysv(f: extern "sysv64" fn(usize, ...)) {
//~^ ERROR: C-variadic function must have a compatible calling convention, like C or cdecl //~^ ERROR: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
//~^^ ERROR: using different calling convention than C or cdecl for varargs functions is unstable //~^^ ERROR: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
f(22, 44); f(22, 44);
} }
fn win(f: extern "win64" fn(usize, ...)) { fn win(f: extern "win64" fn(usize, ...)) {
//~^ ERROR: C-variadic function must have a compatible calling convention, like C or cdecl //~^ ERROR: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
//~^^ ERROR: using different calling convention than C or cdecl for varargs functions is unstable //~^^ ERROR: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
f(22, 44); f(22, 44);
} }

View file

@ -1,4 +1,4 @@
error[E0658]: using different calling convention than C or cdecl for varargs functions is unstable error[E0658]: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
--> $DIR/feature-gate-extended_varargs_abi_support.rs:3:14 --> $DIR/feature-gate-extended_varargs_abi_support.rs:3:14
| |
LL | fn efiapi(f: extern "efiapi" fn(usize, ...)) { LL | fn efiapi(f: extern "efiapi" fn(usize, ...)) {
@ -7,13 +7,13 @@ LL | fn efiapi(f: extern "efiapi" fn(usize, ...)) {
= note: see issue #100189 <https://github.com/rust-lang/rust/issues/100189> for more information = 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 = help: add `#![feature(extended_varargs_abi_support)]` to the crate attributes to enable
error[E0045]: C-variadic function must have a compatible calling convention, like C or cdecl error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
--> $DIR/feature-gate-extended_varargs_abi_support.rs:3:14 --> $DIR/feature-gate-extended_varargs_abi_support.rs:3:14
| |
LL | fn efiapi(f: extern "efiapi" fn(usize, ...)) { LL | fn efiapi(f: extern "efiapi" fn(usize, ...)) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
error[E0658]: using different calling convention than C or cdecl for varargs functions is unstable error[E0658]: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
--> $DIR/feature-gate-extended_varargs_abi_support.rs:8:12 --> $DIR/feature-gate-extended_varargs_abi_support.rs:8:12
| |
LL | fn sysv(f: extern "sysv64" fn(usize, ...)) { LL | fn sysv(f: extern "sysv64" fn(usize, ...)) {
@ -22,13 +22,13 @@ LL | fn sysv(f: extern "sysv64" fn(usize, ...)) {
= note: see issue #100189 <https://github.com/rust-lang/rust/issues/100189> for more information = 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 = help: add `#![feature(extended_varargs_abi_support)]` to the crate attributes to enable
error[E0045]: C-variadic function must have a compatible calling convention, like C or cdecl error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
--> $DIR/feature-gate-extended_varargs_abi_support.rs:8:12 --> $DIR/feature-gate-extended_varargs_abi_support.rs:8:12
| |
LL | fn sysv(f: extern "sysv64" fn(usize, ...)) { LL | fn sysv(f: extern "sysv64" fn(usize, ...)) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
error[E0658]: using different calling convention than C or cdecl for varargs functions is unstable error[E0658]: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
--> $DIR/feature-gate-extended_varargs_abi_support.rs:13:11 --> $DIR/feature-gate-extended_varargs_abi_support.rs:13:11
| |
LL | fn win(f: extern "win64" fn(usize, ...)) { LL | fn win(f: extern "win64" fn(usize, ...)) {
@ -37,7 +37,7 @@ LL | fn win(f: extern "win64" fn(usize, ...)) {
= note: see issue #100189 <https://github.com/rust-lang/rust/issues/100189> for more information = 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 = help: add `#![feature(extended_varargs_abi_support)]` to the crate attributes to enable
error[E0045]: C-variadic function must have a compatible calling convention, like C or cdecl error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
--> $DIR/feature-gate-extended_varargs_abi_support.rs:13:11 --> $DIR/feature-gate-extended_varargs_abi_support.rs:13:11
| |
LL | fn win(f: extern "win64" fn(usize, ...)) { LL | fn win(f: extern "win64" fn(usize, ...)) {

View file

@ -1,4 +1,4 @@
error[E0045]: C-variadic function must have a compatible calling convention, like C or cdecl error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
--> $DIR/variadic-ffi-1.rs:9:5 --> $DIR/variadic-ffi-1.rs:9:5
| |
LL | fn printf(_: *const u8, ...); LL | fn printf(_: *const u8, ...);

View file

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

View file

@ -1,4 +1,4 @@
error[E0045]: C-variadic function must have a compatible calling convention, like C or cdecl error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
--> $DIR/E0045.rs:1:17 --> $DIR/E0045.rs:1:17
| |
LL | extern "Rust" { fn foo(x: u8, ...); } LL | extern "Rust" { fn foo(x: u8, ...); }