diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-04-18 05:16:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-18 05:16:29 +0200 |
| commit | ed892e72dd05c6dbbd425343f84d1c1d348a898d (patch) | |
| tree | 1104c9ffee0578528a05a2c812945639688a6aa7 | |
| parent | 66dd1729616ddf527f3571104a964dfd56d64bc1 (diff) | |
| parent | 097c9c75423db9b11f16300566118dc28d0d9e2e (diff) | |
| download | rust-ed892e72dd05c6dbbd425343f84d1c1d348a898d.tar.gz rust-ed892e72dd05c6dbbd425343f84d1c1d348a898d.zip | |
Rollup merge of #139615 - nnethercote:rm-name_or_empty, r=jdonszelmann
Remove `name_or_empty` Another step towards #137978. r? ``@jdonszelmann``
| -rw-r--r-- | clippy_utils/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_utils/src/lib.rs b/clippy_utils/src/lib.rs index 9f450d654d5..f715fc86e4e 100644 --- a/clippy_utils/src/lib.rs +++ b/clippy_utils/src/lib.rs @@ -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. |
