about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-06-23 12:38:27 +0000
committerbors <bors@rust-lang.org>2025-06-23 12:38:27 +0000
commit42245d34d22ade32b3f276dcf74deb826841594c (patch)
tree8b813764cf5705a92cf4be577b8ec223d1875b61 /compiler/rustc_hir_analysis/src
parentae2fc9722f08ef131407c1dc8057768868f65e8e (diff)
parent3e8e06545e8152c98f0d5ec75a6116b8070d9f8e (diff)
downloadrust-42245d34d22ade32b3f276dcf74deb826841594c.tar.gz
rust-42245d34d22ade32b3f276dcf74deb826841594c.zip
Auto merge of #142906 - jdonszelmann:rollup-togt1dl, r=jdonszelmann
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#142493 (rework `#[naked]` attribute parser)
 - rust-lang/rust#142636 (bootstrap.example.toml: use less contextual format)
 - rust-lang/rust#142822 (Make `PartialEq` a `const_trait`)
 - rust-lang/rust#142892 (Fix ICE on debug builds where lints are delayed on the crate root)
 - rust-lang/rust#142904 (notify me when rdg is touched)

Failed merges:

 - rust-lang/rust#142827 (Move error code explanation removal check into tidy)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
-rw-r--r--compiler/rustc_hir_analysis/src/check/check.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs
index 752cc2eff97..60b691e0f75 100644
--- a/compiler/rustc_hir_analysis/src/check/check.rs
+++ b/compiler/rustc_hir_analysis/src/check/check.rs
@@ -2,8 +2,8 @@ use std::cell::LazyCell;
 use std::ops::ControlFlow;
 
 use rustc_abi::FieldIdx;
-use rustc_attr_data_structures::AttributeKind;
 use rustc_attr_data_structures::ReprAttr::ReprPacked;
+use rustc_attr_data_structures::{AttributeKind, find_attr};
 use rustc_data_structures::unord::{UnordMap, UnordSet};
 use rustc_errors::codes::*;
 use rustc_errors::{EmissionGuarantee, MultiSpan};
@@ -104,7 +104,7 @@ pub fn check_abi_fn_ptr(tcx: TyCtxt<'_>, hir_id: hir::HirId, span: Span, abi: Ex
 pub fn check_custom_abi(tcx: TyCtxt<'_>, def_id: LocalDefId, fn_sig: FnSig<'_>, fn_sig_span: Span) {
     if fn_sig.abi == ExternAbi::Custom {
         // Function definitions that use `extern "custom"` must be naked functions.
-        if !tcx.has_attr(def_id, sym::naked) {
+        if !find_attr!(tcx.get_all_attrs(def_id), AttributeKind::Naked(_)) {
             tcx.dcx().emit_err(crate::errors::AbiCustomClothedFunction {
                 span: fn_sig_span,
                 naked_span: tcx.def_span(def_id).shrink_to_lo(),