@@ -379,7 +379,7 @@ impl<'hir> LateLintPass<'hir> for MetadataCollector {
379379 /// }
380380 /// ```
381381 fn check_item ( & mut self , cx : & LateContext < ' hir > , item : & ' hir Item < ' _ > ) {
382- if let ItemKind :: Static ( ref ty, Mutability :: Not , _) = item. kind {
382+ if let ItemKind :: Static ( ty, Mutability :: Not , _) = item. kind {
383383 // Normal lint
384384 if_chain ! {
385385 // item validation
@@ -489,7 +489,7 @@ fn extract_attr_docs(cx: &LateContext<'_>, item: &Item<'_>) -> Option<String> {
489489 . hir ( )
490490 . attrs ( item. hir_id ( ) )
491491 . iter ( )
492- . filter_map ( |ref x| x. doc_str ( ) . map ( |sym| sym. as_str ( ) . to_string ( ) ) )
492+ . filter_map ( |x| x. doc_str ( ) . map ( |sym| sym. as_str ( ) . to_string ( ) ) )
493493 . reduce ( |mut acc, sym| {
494494 acc. push_str ( & sym) ;
495495 acc. push ( '\n' ) ;
@@ -596,7 +596,7 @@ fn extract_emission_info<'hir>(
596596 let mut multi_part = false ;
597597
598598 for arg in args {
599- let ( arg_ty, _) = walk_ptrs_ty_depth ( cx. typeck_results ( ) . expr_ty ( & arg) ) ;
599+ let ( arg_ty, _) = walk_ptrs_ty_depth ( cx. typeck_results ( ) . expr_ty ( arg) ) ;
600600
601601 if match_type ( cx, arg_ty, & paths:: LINT ) {
602602 // If we found the lint arg, extract the lint name
@@ -671,7 +671,7 @@ impl<'a, 'hir> intravisit::Visitor<'hir> for LintResolver<'a, 'hir> {
671671 if let ExprKind :: Path ( qpath) = & expr. kind;
672672 if let QPath :: Resolved ( _, path) = qpath;
673673
674- let ( expr_ty, _) = walk_ptrs_ty_depth( self . cx. typeck_results( ) . expr_ty( & expr) ) ;
674+ let ( expr_ty, _) = walk_ptrs_ty_depth( self . cx. typeck_results( ) . expr_ty( expr) ) ;
675675 if match_type( self . cx, expr_ty, & paths:: LINT ) ;
676676 then {
677677 if let hir:: def:: Res :: Def ( DefKind :: Static , _) = path. res {
@@ -730,7 +730,7 @@ impl<'a, 'hir> intravisit::Visitor<'hir> for ApplicabilityResolver<'a, 'hir> {
730730 }
731731
732732 fn visit_expr ( & mut self , expr : & ' hir hir:: Expr < ' hir > ) {
733- let ( expr_ty, _) = walk_ptrs_ty_depth ( self . cx . typeck_results ( ) . expr_ty ( & expr) ) ;
733+ let ( expr_ty, _) = walk_ptrs_ty_depth ( self . cx . typeck_results ( ) . expr_ty ( expr) ) ;
734734
735735 if_chain ! {
736736 if match_type( self . cx, expr_ty, & paths:: APPLICABILITY ) ;
0 commit comments