Skip to content

Commit 8808a9c

Browse files
hir_analysis: Elaborate on lint strategy for unsupported ABIs
Co-authored-by: Ralf Jung <[email protected]>
1 parent 0df01a0 commit 8808a9c

File tree

1 file changed

+3
-1
lines changed
  • compiler/rustc_hir_analysis/src/check

1 file changed

+3
-1
lines changed

compiler/rustc_hir_analysis/src/check/check.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ pub fn check_abi_fn_ptr(tcx: TyCtxt<'_>, hir_id: hir::HirId, span: Span, abi: Ex
8181
// in `check_abi` above.
8282
match AbiMap::from_target(&tcx.sess.target).canonize_abi(abi, false) {
8383
AbiMapping::Direct(..) => (),
84-
// this is not a redundant match arm: these ABIs started linting after reviving this lint
84+
// This is not a redundant match arm: these ABIs started linting after introducing
85+
// UNSUPPORTED_FN_PTR_CALLING_CONVENTIONS already existed and we want to
86+
// avoid expanding the scope of that lint so it can move to a hard error sooner.
8587
AbiMapping::Deprecated(..) => {
8688
tcx.node_span_lint(UNSUPPORTED_CALLING_CONVENTIONS, hir_id, span, |lint| {
8789
lint.primary_message("use of calling convention not supported on this target");

0 commit comments

Comments
 (0)