@@ -275,8 +275,8 @@ declare_lint_pass!(Attributes => [
275275 BLANKET_CLIPPY_RESTRICTION_LINTS ,
276276] ) ;
277277
278- impl < ' a , ' tcx > LateLintPass < ' a , ' tcx > for Attributes {
279- fn check_attribute ( & mut self , cx : & LateContext < ' a , ' tcx > , attr : & ' tcx Attribute ) {
278+ impl < ' tcx > LateLintPass < ' tcx > for Attributes {
279+ fn check_attribute ( & mut self , cx : & LateContext < ' tcx > , attr : & ' tcx Attribute ) {
280280 if let Some ( items) = & attr. meta_item_list ( ) {
281281 if let Some ( ident) = attr. ident ( ) {
282282 let ident = & * ident. as_str ( ) ;
@@ -303,7 +303,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Attributes {
303303 }
304304 }
305305
306- fn check_item ( & mut self , cx : & LateContext < ' a , ' tcx > , item : & ' tcx Item < ' _ > ) {
306+ fn check_item ( & mut self , cx : & LateContext < ' tcx > , item : & ' tcx Item < ' _ > ) {
307307 if is_relevant_item ( cx, item) {
308308 check_attrs ( cx, item. span , item. ident . name , & item. attrs )
309309 }
@@ -375,20 +375,20 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Attributes {
375375 }
376376 }
377377
378- fn check_impl_item ( & mut self , cx : & LateContext < ' a , ' tcx > , item : & ' tcx ImplItem < ' _ > ) {
378+ fn check_impl_item ( & mut self , cx : & LateContext < ' tcx > , item : & ' tcx ImplItem < ' _ > ) {
379379 if is_relevant_impl ( cx, item) {
380380 check_attrs ( cx, item. span , item. ident . name , & item. attrs )
381381 }
382382 }
383383
384- fn check_trait_item ( & mut self , cx : & LateContext < ' a , ' tcx > , item : & ' tcx TraitItem < ' _ > ) {
384+ fn check_trait_item ( & mut self , cx : & LateContext < ' tcx > , item : & ' tcx TraitItem < ' _ > ) {
385385 if is_relevant_trait ( cx, item) {
386386 check_attrs ( cx, item. span , item. ident . name , & item. attrs )
387387 }
388388 }
389389}
390390
391- fn check_clippy_lint_names ( cx : & LateContext < ' _ , ' _ > , ident : & str , items : & [ NestedMetaItem ] ) {
391+ fn check_clippy_lint_names ( cx : & LateContext < ' _ > , ident : & str , items : & [ NestedMetaItem ] ) {
392392 fn extract_name ( lint : & NestedMetaItem ) -> Option < SymbolStr > {
393393 if_chain ! {
394394 if let Some ( meta_item) = lint. meta_item( ) ;
@@ -455,22 +455,22 @@ fn check_clippy_lint_names(cx: &LateContext<'_, '_>, ident: &str, items: &[Neste
455455 }
456456}
457457
458- fn is_relevant_item ( cx : & LateContext < ' _ , ' _ > , item : & Item < ' _ > ) -> bool {
458+ fn is_relevant_item ( cx : & LateContext < ' _ > , item : & Item < ' _ > ) -> bool {
459459 if let ItemKind :: Fn ( _, _, eid) = item. kind {
460460 is_relevant_expr ( cx, cx. tcx . body_tables ( eid) , & cx. tcx . hir ( ) . body ( eid) . value )
461461 } else {
462462 true
463463 }
464464}
465465
466- fn is_relevant_impl ( cx : & LateContext < ' _ , ' _ > , item : & ImplItem < ' _ > ) -> bool {
466+ fn is_relevant_impl ( cx : & LateContext < ' _ > , item : & ImplItem < ' _ > ) -> bool {
467467 match item. kind {
468468 ImplItemKind :: Fn ( _, eid) => is_relevant_expr ( cx, cx. tcx . body_tables ( eid) , & cx. tcx . hir ( ) . body ( eid) . value ) ,
469469 _ => false ,
470470 }
471471}
472472
473- fn is_relevant_trait ( cx : & LateContext < ' _ , ' _ > , item : & TraitItem < ' _ > ) -> bool {
473+ fn is_relevant_trait ( cx : & LateContext < ' _ > , item : & TraitItem < ' _ > ) -> bool {
474474 match item. kind {
475475 TraitItemKind :: Fn ( _, TraitFn :: Required ( _) ) => true ,
476476 TraitItemKind :: Fn ( _, TraitFn :: Provided ( eid) ) => {
@@ -480,7 +480,7 @@ fn is_relevant_trait(cx: &LateContext<'_, '_>, item: &TraitItem<'_>) -> bool {
480480 }
481481}
482482
483- fn is_relevant_block ( cx : & LateContext < ' _ , ' _ > , tables : & ty:: TypeckTables < ' _ > , block : & Block < ' _ > ) -> bool {
483+ fn is_relevant_block ( cx : & LateContext < ' _ > , tables : & ty:: TypeckTables < ' _ > , block : & Block < ' _ > ) -> bool {
484484 if let Some ( stmt) = block. stmts . first ( ) {
485485 match & stmt. kind {
486486 StmtKind :: Local ( _) => true ,
@@ -492,7 +492,7 @@ fn is_relevant_block(cx: &LateContext<'_, '_>, tables: &ty::TypeckTables<'_>, bl
492492 }
493493}
494494
495- fn is_relevant_expr ( cx : & LateContext < ' _ , ' _ > , tables : & ty:: TypeckTables < ' _ > , expr : & Expr < ' _ > ) -> bool {
495+ fn is_relevant_expr ( cx : & LateContext < ' _ > , tables : & ty:: TypeckTables < ' _ > , expr : & Expr < ' _ > ) -> bool {
496496 match & expr. kind {
497497 ExprKind :: Block ( block, _) => is_relevant_block ( cx, tables, block) ,
498498 ExprKind :: Ret ( Some ( e) ) => is_relevant_expr ( cx, tables, e) ,
@@ -512,7 +512,7 @@ fn is_relevant_expr(cx: &LateContext<'_, '_>, tables: &ty::TypeckTables<'_>, exp
512512 }
513513}
514514
515- fn check_attrs ( cx : & LateContext < ' _ , ' _ > , span : Span , name : Name , attrs : & [ Attribute ] ) {
515+ fn check_attrs ( cx : & LateContext < ' _ > , span : Span , name : Name , attrs : & [ Attribute ] ) {
516516 if span. from_expansion ( ) {
517517 return ;
518518 }
@@ -537,7 +537,7 @@ fn check_attrs(cx: &LateContext<'_, '_>, span: Span, name: Name, attrs: &[Attrib
537537 }
538538}
539539
540- fn check_semver ( cx : & LateContext < ' _ , ' _ > , span : Span , lit : & Lit ) {
540+ fn check_semver ( cx : & LateContext < ' _ > , span : Span , lit : & Lit ) {
541541 if let LitKind :: Str ( is, _) = lit. kind {
542542 if Version :: parse ( & is. as_str ( ) ) . is_ok ( ) {
543543 return ;
0 commit comments