File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -2133,17 +2133,11 @@ pub fn std_or_core(cx: &LateContext<'_>) -> Option<&'static str> {
2133
2133
}
2134
2134
2135
2135
pub fn is_no_std_crate ( cx : & LateContext < ' _ > ) -> bool {
2136
- cx. tcx
2137
- . hir_attrs ( hir:: CRATE_HIR_ID )
2138
- . iter ( )
2139
- . any ( |attr| attr. has_name ( sym:: no_std) )
2136
+ find_attr ! ( cx. tcx. hir_attrs( hir:: CRATE_HIR_ID ) , AttributeKind :: NoStd ( ..) )
2140
2137
}
2141
2138
2142
2139
pub fn is_no_core_crate ( cx : & LateContext < ' _ > ) -> bool {
2143
- cx. tcx
2144
- . hir_attrs ( hir:: CRATE_HIR_ID )
2145
- . iter ( )
2146
- . any ( |attr| attr. has_name ( sym:: no_core) )
2140
+ find_attr ! ( cx. tcx. hir_attrs( hir:: CRATE_HIR_ID ) , AttributeKind :: NoCore ( ..) )
2147
2141
}
2148
2142
2149
2143
/// Check if parent of a hir node is a trait implementation block.
You can’t perform that action at this time.
0 commit comments