1
Fork 0

Update lint message for ABI not supported

This commit is contained in:
Tamme Dittrich 2024-10-14 08:07:41 +02:00
parent f6648f252a
commit b6b6c12819
8 changed files with 57 additions and 57 deletions

View file

@ -61,9 +61,9 @@ pub fn check_abi_fn_ptr(tcx: TyCtxt<'_>, hir_id: hir::HirId, span: Span, abi: Ab
Some(true) => (),
Some(false) | None => {
tcx.node_span_lint(UNSUPPORTED_FN_PTR_CALLING_CONVENTIONS, hir_id, span, |lint| {
lint.primary_message(
"use of calling convention not supported on this target on function pointer",
);
lint.primary_message(format!(
"the calling convention {abi} is not supported on this target"
));
});
}
}

View file

@ -3859,7 +3859,7 @@ declare_lint! {
/// This will produce:
///
/// ```text
/// warning: use of calling convention not supported on this target on function pointer
/// warning: the calling convention `"stdcall"` is not supported on this target
/// --> $DIR/unsupported.rs:34:15
/// |
/// LL | fn stdcall_ptr(f: extern "stdcall" fn()) {