diff --git a/compiler/rustc_hir_analysis/src/lib.rs b/compiler/rustc_hir_analysis/src/lib.rs index 782c95d63355..46d57563a4fd 100644 --- a/compiler/rustc_hir_analysis/src/lib.rs +++ b/compiler/rustc_hir_analysis/src/lib.rs @@ -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;