about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-09-13 04:21:44 +0000
committerbors <bors@rust-lang.org>2025-09-13 04:21:44 +0000
commit9642c0ef6749e57ce76ac153807df1cc38cd26ee (patch)
tree5a7a8696d8b409c35263e190fe04bf6287a2cd24 /src
parent4ba1cf9ade4c8e2fa10676a50ee34594eb161837 (diff)
parentec0f3bd2edb427a27bac20b1ac7c7a5bd842bd37 (diff)
downloadrust-9642c0ef6749e57ce76ac153807df1cc38cd26ee.tar.gz
rust-9642c0ef6749e57ce76ac153807df1cc38cd26ee.zip
Auto merge of #146494 - jdonszelmann:rollup-0bbwwwf, r=jdonszelmann
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#146389 (Convert `no_std` and `no_core` to the new attribute infrastructure)
 - rust-lang/rust#146403 (sort array trait implementation suggestions correctly)
 - rust-lang/rust#146452 (Improve `alloc::Layout` coverage)
 - rust-lang/rust#146477 (Improve `core::char` coverage)
 - rust-lang/rust#146481 (Improve `core::hash` coverage)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src')
-rw-r--r--src/tools/clippy/clippy_utils/src/lib.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/tools/clippy/clippy_utils/src/lib.rs b/src/tools/clippy/clippy_utils/src/lib.rs
index 14b64eb4d54..e1077bdf4b1 100644
--- a/src/tools/clippy/clippy_utils/src/lib.rs
+++ b/src/tools/clippy/clippy_utils/src/lib.rs
@@ -2133,17 +2133,11 @@ pub fn std_or_core(cx: &LateContext<'_>) -> Option<&'static str> {
 }
 
 pub fn is_no_std_crate(cx: &LateContext<'_>) -> bool {
-    cx.tcx
-        .hir_attrs(hir::CRATE_HIR_ID)
-        .iter()
-        .any(|attr| attr.has_name(sym::no_std))
+    find_attr!(cx.tcx.hir_attrs(hir::CRATE_HIR_ID), AttributeKind::NoStd(..))
 }
 
 pub fn is_no_core_crate(cx: &LateContext<'_>) -> bool {
-    cx.tcx
-        .hir_attrs(hir::CRATE_HIR_ID)
-        .iter()
-        .any(|attr| attr.has_name(sym::no_core))
+    find_attr!(cx.tcx.hir_attrs(hir::CRATE_HIR_ID), AttributeKind::NoCore(..))
 }
 
 /// Check if parent of a hir node is a trait implementation block.