Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Use ticks around abis.

Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
  • Loading branch information
jackh726 and estebank committed Oct 23, 2022
1 parent ba847ca commit 65ef625
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/rustc_hir_analysis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 65ef625

Please sign in to comment.