@@ -251,8 +251,8 @@ declare_lint_pass!(Attributes => [
251251 UNKNOWN_CLIPPY_LINTS ,
252252] ) ;
253253
254- impl < ' a , ' tcx > LateLintPass < ' a , ' tcx > for Attributes {
255- fn check_attribute ( & mut self , cx : & LateContext < ' a , ' tcx > , attr : & ' tcx Attribute ) {
254+ impl < ' tcx > LateLintPass < ' tcx > for Attributes {
255+ fn check_attribute ( & mut self , cx : & LateContext < ' tcx > , attr : & ' tcx Attribute ) {
256256 if let Some ( items) = & attr. meta_item_list ( ) {
257257 if let Some ( ident) = attr. ident ( ) {
258258 match & * ident. as_str ( ) {
@@ -278,7 +278,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Attributes {
278278 }
279279 }
280280
281- fn check_item ( & mut self , cx : & LateContext < ' a , ' tcx > , item : & ' tcx Item < ' _ > ) {
281+ fn check_item ( & mut self , cx : & LateContext < ' tcx > , item : & ' tcx Item < ' _ > ) {
282282 if is_relevant_item ( cx, item) {
283283 check_attrs ( cx, item. span , item. ident . name , & item. attrs )
284284 }
@@ -350,21 +350,21 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Attributes {
350350 }
351351 }
352352
353- fn check_impl_item ( & mut self , cx : & LateContext < ' a , ' tcx > , item : & ' tcx ImplItem < ' _ > ) {
353+ fn check_impl_item ( & mut self , cx : & LateContext < ' tcx > , item : & ' tcx ImplItem < ' _ > ) {
354354 if is_relevant_impl ( cx, item) {
355355 check_attrs ( cx, item. span , item. ident . name , & item. attrs )
356356 }
357357 }
358358
359- fn check_trait_item ( & mut self , cx : & LateContext < ' a , ' tcx > , item : & ' tcx TraitItem < ' _ > ) {
359+ fn check_trait_item ( & mut self , cx : & LateContext < ' tcx > , item : & ' tcx TraitItem < ' _ > ) {
360360 if is_relevant_trait ( cx, item) {
361361 check_attrs ( cx, item. span , item. ident . name , & item. attrs )
362362 }
363363 }
364364}
365365
366366#[ allow( clippy:: single_match_else) ]
367- fn check_clippy_lint_names ( cx : & LateContext < ' _ , ' _ > , items : & [ NestedMetaItem ] ) {
367+ fn check_clippy_lint_names ( cx : & LateContext < ' _ > , items : & [ NestedMetaItem ] ) {
368368 let lint_store = cx. lints ( ) ;
369369 for lint in items {
370370 if_chain ! {
@@ -416,22 +416,22 @@ fn check_clippy_lint_names(cx: &LateContext<'_, '_>, items: &[NestedMetaItem]) {
416416 }
417417}
418418
419- fn is_relevant_item ( cx : & LateContext < ' _ , ' _ > , item : & Item < ' _ > ) -> bool {
419+ fn is_relevant_item ( cx : & LateContext < ' _ > , item : & Item < ' _ > ) -> bool {
420420 if let ItemKind :: Fn ( _, _, eid) = item. kind {
421421 is_relevant_expr ( cx, cx. tcx . body_tables ( eid) , & cx. tcx . hir ( ) . body ( eid) . value )
422422 } else {
423423 true
424424 }
425425}
426426
427- fn is_relevant_impl ( cx : & LateContext < ' _ , ' _ > , item : & ImplItem < ' _ > ) -> bool {
427+ fn is_relevant_impl ( cx : & LateContext < ' _ > , item : & ImplItem < ' _ > ) -> bool {
428428 match item. kind {
429429 ImplItemKind :: Fn ( _, eid) => is_relevant_expr ( cx, cx. tcx . body_tables ( eid) , & cx. tcx . hir ( ) . body ( eid) . value ) ,
430430 _ => false ,
431431 }
432432}
433433
434- fn is_relevant_trait ( cx : & LateContext < ' _ , ' _ > , item : & TraitItem < ' _ > ) -> bool {
434+ fn is_relevant_trait ( cx : & LateContext < ' _ > , item : & TraitItem < ' _ > ) -> bool {
435435 match item. kind {
436436 TraitItemKind :: Fn ( _, TraitFn :: Required ( _) ) => true ,
437437 TraitItemKind :: Fn ( _, TraitFn :: Provided ( eid) ) => {
@@ -441,7 +441,7 @@ fn is_relevant_trait(cx: &LateContext<'_, '_>, item: &TraitItem<'_>) -> bool {
441441 }
442442}
443443
444- fn is_relevant_block ( cx : & LateContext < ' _ , ' _ > , tables : & ty:: TypeckTables < ' _ > , block : & Block < ' _ > ) -> bool {
444+ fn is_relevant_block ( cx : & LateContext < ' _ > , tables : & ty:: TypeckTables < ' _ > , block : & Block < ' _ > ) -> bool {
445445 if let Some ( stmt) = block. stmts . first ( ) {
446446 match & stmt. kind {
447447 StmtKind :: Local ( _) => true ,
@@ -453,7 +453,7 @@ fn is_relevant_block(cx: &LateContext<'_, '_>, tables: &ty::TypeckTables<'_>, bl
453453 }
454454}
455455
456- fn is_relevant_expr ( cx : & LateContext < ' _ , ' _ > , tables : & ty:: TypeckTables < ' _ > , expr : & Expr < ' _ > ) -> bool {
456+ fn is_relevant_expr ( cx : & LateContext < ' _ > , tables : & ty:: TypeckTables < ' _ > , expr : & Expr < ' _ > ) -> bool {
457457 match & expr. kind {
458458 ExprKind :: Block ( block, _) => is_relevant_block ( cx, tables, block) ,
459459 ExprKind :: Ret ( Some ( e) ) => is_relevant_expr ( cx, tables, e) ,
@@ -473,7 +473,7 @@ fn is_relevant_expr(cx: &LateContext<'_, '_>, tables: &ty::TypeckTables<'_>, exp
473473 }
474474}
475475
476- fn check_attrs ( cx : & LateContext < ' _ , ' _ > , span : Span , name : Name , attrs : & [ Attribute ] ) {
476+ fn check_attrs ( cx : & LateContext < ' _ > , span : Span , name : Name , attrs : & [ Attribute ] ) {
477477 if span. from_expansion ( ) {
478478 return ;
479479 }
@@ -498,7 +498,7 @@ fn check_attrs(cx: &LateContext<'_, '_>, span: Span, name: Name, attrs: &[Attrib
498498 }
499499}
500500
501- fn check_semver ( cx : & LateContext < ' _ , ' _ > , span : Span , lit : & Lit ) {
501+ fn check_semver ( cx : & LateContext < ' _ > , span : Span , lit : & Lit ) {
502502 if let LitKind :: Str ( is, _) = lit. kind {
503503 if Version :: parse ( & is. as_str ( ) ) . is_ok ( ) {
504504 return ;
0 commit comments