Skip to content

Commit ed892e7

Browse files
authored
Rollup merge of #139615 - nnethercote:rm-name_or_empty, r=jdonszelmann
Remove `name_or_empty` Another step towards #137978. r? ``@jdonszelmann``
2 parents 66dd172 + 097c9c7 commit ed892e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_utils/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2363,14 +2363,14 @@ pub fn is_no_std_crate(cx: &LateContext<'_>) -> bool {
23632363
cx.tcx
23642364
.hir_attrs(hir::CRATE_HIR_ID)
23652365
.iter()
2366-
.any(|attr| attr.name_or_empty() == sym::no_std)
2366+
.any(|attr| attr.has_name(sym::no_std))
23672367
}
23682368

23692369
pub fn is_no_core_crate(cx: &LateContext<'_>) -> bool {
23702370
cx.tcx
23712371
.hir_attrs(hir::CRATE_HIR_ID)
23722372
.iter()
2373-
.any(|attr| attr.name_or_empty() == sym::no_core)
2373+
.any(|attr| attr.has_name(sym::no_core))
23742374
}
23752375

23762376
/// Check if parent of a hir node is a trait implementation block.

0 commit comments

Comments
 (0)