@@ -286,14 +286,14 @@ impl<'tcx> LateLintPass<'tcx> for Attributes {
286286 } ,
287287 _ => { } ,
288288 }
289- if items. is_empty ( ) || !attr. check_name ( sym ! ( deprecated) ) {
289+ if items. is_empty ( ) || !attr. has_name ( sym ! ( deprecated) ) {
290290 return ;
291291 }
292292 for item in items {
293293 if_chain ! {
294294 if let NestedMetaItem :: MetaItem ( mi) = & item;
295295 if let MetaItemKind :: NameValue ( lit) = & mi. kind;
296- if mi. check_name ( sym!( since) ) ;
296+ if mi. has_name ( sym!( since) ) ;
297297 then {
298298 check_semver( cx, item. span( ) , lit) ;
299299 }
@@ -309,7 +309,7 @@ impl<'tcx> LateLintPass<'tcx> for Attributes {
309309 }
310310 match item. kind {
311311 ItemKind :: ExternCrate ( ..) | ItemKind :: Use ( ..) => {
312- let skip_unused_imports = item. attrs . iter ( ) . any ( |attr| attr. check_name ( sym ! ( macro_use) ) ) ;
312+ let skip_unused_imports = item. attrs . iter ( ) . any ( |attr| attr. has_name ( sym ! ( macro_use) ) ) ;
313313
314314 for attr in item. attrs {
315315 if in_external_macro ( cx. sess ( ) , attr. span ) {
@@ -524,7 +524,7 @@ fn check_attrs(cx: &LateContext<'_>, span: Span, name: Name, attrs: &[Attribute]
524524
525525 for attr in attrs {
526526 if let Some ( values) = attr. meta_item_list ( ) {
527- if values. len ( ) != 1 || !attr. check_name ( sym ! ( inline) ) {
527+ if values. len ( ) != 1 || !attr. has_name ( sym ! ( inline) ) {
528528 continue ;
529529 }
530530 if is_word ( & values[ 0 ] , sym ! ( always) ) {
@@ -558,7 +558,7 @@ fn check_semver(cx: &LateContext<'_>, span: Span, lit: &Lit) {
558558
559559fn is_word ( nmi : & NestedMetaItem , expected : Symbol ) -> bool {
560560 if let NestedMetaItem :: MetaItem ( mi) = & nmi {
561- mi. is_word ( ) && mi. check_name ( expected)
561+ mi. is_word ( ) && mi. has_name ( expected)
562562 } else {
563563 false
564564 }
@@ -618,15 +618,15 @@ fn check_empty_line_after_outer_attr(cx: &EarlyContext<'_>, item: &rustc_ast::as
618618fn check_deprecated_cfg_attr ( cx : & EarlyContext < ' _ > , attr : & Attribute ) {
619619 if_chain ! {
620620 // check cfg_attr
621- if attr. check_name ( sym!( cfg_attr) ) ;
621+ if attr. has_name ( sym!( cfg_attr) ) ;
622622 if let Some ( items) = attr. meta_item_list( ) ;
623623 if items. len( ) == 2 ;
624624 // check for `rustfmt`
625625 if let Some ( feature_item) = items[ 0 ] . meta_item( ) ;
626- if feature_item. check_name ( sym!( rustfmt) ) ;
626+ if feature_item. has_name ( sym!( rustfmt) ) ;
627627 // check for `rustfmt_skip` and `rustfmt::skip`
628628 if let Some ( skip_item) = & items[ 1 ] . meta_item( ) ;
629- if skip_item. check_name ( sym!( rustfmt_skip) ) ||
629+ if skip_item. has_name ( sym!( rustfmt_skip) ) ||
630630 skip_item. path. segments. last( ) . expect( "empty path in attribute" ) . ident. name == sym!( skip) ;
631631 // Only lint outer attributes, because custom inner attributes are unstable
632632 // Tracking issue: https://github.com/rust-lang/rust/issues/54726
@@ -685,7 +685,7 @@ fn check_mismatched_target_os(cx: &EarlyContext<'_>, attr: &Attribute) {
685685 }
686686
687687 if_chain ! {
688- if attr. check_name ( sym!( cfg) ) ;
688+ if attr. has_name ( sym!( cfg) ) ;
689689 if let Some ( list) = attr. meta_item_list( ) ;
690690 let mismatched = find_mismatched_target_os( & list) ;
691691 if !mismatched. is_empty( ) ;
0 commit comments