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:
commit
540fb228af
42 changed files with 309 additions and 226 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue