Apply suggestions from code review
Use ticks around abis. Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
This commit is contained in:
parent
ba847cad6d
commit
65ef62597b
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue