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> {
21332133}
21342134
21352135pub 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 ( ..) )
21402137}
21412138
21422139pub 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 ( ..) )
21472141}
21482142
21492143/// Check if parent of a hir node is a trait implementation block.
You can’t perform that action at this time.
0 commit comments