Apply suggestions from code review

Use ticks around abis.

Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
This commit is contained in:
Jack Huey 2022-08-16 14:29:19 -04:00
parent ba847cad6d
commit 65ef62597b

View file

@ -119,10 +119,10 @@ use bounds::Bounds;
fn require_c_abi_if_c_variadic(tcx: TyCtxt<'_>, decl: &hir::FnDecl<'_>, abi: Abi, span: Span) {
const ERROR_HEAD: &str = "C-variadic function must have a compatible calling convention";
const CONVENTIONS_UNSTABLE: &str = "C, cdecl, win64, sysv64 or efiapi";
const CONVENTIONS_STABLE: &str = "C or cdecl";
const CONVENTIONS_UNSTABLE: &str = "`C`, `cdecl`, `win64`, `sysv64` or `efiapi`";
const CONVENTIONS_STABLE: &str = "`C` or `cdecl`";
const UNSTABLE_EXPLAIN: &str =
"using different calling convention than C or cdecl for varargs functions is unstable";
"using different calling convention than `C` or `cdecl` for varargs functions is unstable";
if !decl.c_variadic || matches!(abi, Abi::C { .. } | Abi::Cdecl { .. }) {
return;