about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/check/check.rs
diff options
context:
space:
mode:
authorJubilee <workingjubilee@gmail.com>2025-06-09 23:48:33 -0700
committerGitHub <noreply@github.com>2025-06-09 23:48:33 -0700
commit8808a9c17ff8b41b3ac6d6f10be79d0325e356d4 (patch)
tree7db4edccceea7109000cdec7a745ca85fc54240f /compiler/rustc_hir_analysis/src/check/check.rs
parent0df01a04fd6951489b327806d31b556aeebc3d2c (diff)
downloadrust-8808a9c17ff8b41b3ac6d6f10be79d0325e356d4.tar.gz
rust-8808a9c17ff8b41b3ac6d6f10be79d0325e356d4.zip
hir_analysis: Elaborate on lint strategy for unsupported ABIs
Co-authored-by: Ralf Jung <post@ralfj.de>
Diffstat (limited to 'compiler/rustc_hir_analysis/src/check/check.rs')
-rw-r--r--compiler/rustc_hir_analysis/src/check/check.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs
index 87fac985dcc..60ca0155bdd 100644
--- a/compiler/rustc_hir_analysis/src/check/check.rs
+++ b/compiler/rustc_hir_analysis/src/check/check.rs
@@ -81,7 +81,9 @@ pub fn check_abi_fn_ptr(tcx: TyCtxt<'_>, hir_id: hir::HirId, span: Span, abi: Ex
     // in `check_abi` above.
     match AbiMap::from_target(&tcx.sess.target).canonize_abi(abi, false) {
         AbiMapping::Direct(..) => (),
-        // this is not a redundant match arm: these ABIs started linting after reviving this lint
+        // This is not a redundant match arm: these ABIs started linting after introducing
+        // UNSUPPORTED_FN_PTR_CALLING_CONVENTIONS already existed and we want to
+        // avoid expanding the scope of that lint so it can move to a hard error sooner.
         AbiMapping::Deprecated(..) => {
             tcx.node_span_lint(UNSUPPORTED_CALLING_CONVENTIONS, hir_id, span, |lint| {
                 lint.primary_message("use of calling convention not supported on this target");