Rollup merge of #139615 - nnethercote:rm-name_or_empty, r=jdonszelmann

Remove `name_or_empty`

Another step towards #137978.

r? ``@jdonszelmann``
This commit is contained in:
Matthias Krüger 2025-04-18 05:16:29 +02:00 committed by GitHub
commit 540fb228af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
42 changed files with 309 additions and 226 deletions

View file

@ -2363,14 +2363,14 @@ pub fn is_no_std_crate(cx: &LateContext<'_>) -> bool {
cx.tcx
.hir_attrs(hir::CRATE_HIR_ID)
.iter()
.any(|attr| attr.name_or_empty() == sym::no_std)
.any(|attr| attr.has_name(sym::no_std))
}
pub fn is_no_core_crate(cx: &LateContext<'_>) -> bool {
cx.tcx
.hir_attrs(hir::CRATE_HIR_ID)
.iter()
.any(|attr| attr.name_or_empty() == sym::no_core)
.any(|attr| attr.has_name(sym::no_core))
}
/// Check if parent of a hir node is a trait implementation block.