@@ -379,7 +379,7 @@ impl<'hir> LateLintPass<'hir> for MetadataCollector {
379
379
/// }
380
380
/// ```
381
381
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 {
383
383
// Normal lint
384
384
if_chain ! {
385
385
// item validation
@@ -489,7 +489,7 @@ fn extract_attr_docs(cx: &LateContext<'_>, item: &Item<'_>) -> Option<String> {
489
489
. hir ( )
490
490
. attrs ( item. hir_id ( ) )
491
491
. 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 ( ) ) )
493
493
. reduce ( |mut acc, sym| {
494
494
acc. push_str ( & sym) ;
495
495
acc. push ( '\n' ) ;
@@ -596,7 +596,7 @@ fn extract_emission_info<'hir>(
596
596
let mut multi_part = false ;
597
597
598
598
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) ) ;
600
600
601
601
if match_type ( cx, arg_ty, & paths:: LINT ) {
602
602
// If we found the lint arg, extract the lint name
@@ -671,7 +671,7 @@ impl<'a, 'hir> intravisit::Visitor<'hir> for LintResolver<'a, 'hir> {
671
671
if let ExprKind :: Path ( qpath) = & expr. kind;
672
672
if let QPath :: Resolved ( _, path) = qpath;
673
673
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) ) ;
675
675
if match_type( self . cx, expr_ty, & paths:: LINT ) ;
676
676
then {
677
677
if let hir:: def:: Res :: Def ( DefKind :: Static , _) = path. res {
@@ -730,7 +730,7 @@ impl<'a, 'hir> intravisit::Visitor<'hir> for ApplicabilityResolver<'a, 'hir> {
730
730
}
731
731
732
732
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) ) ;
734
734
735
735
if_chain ! {
736
736
if match_type( self . cx, expr_ty, & paths:: APPLICABILITY ) ;
0 commit comments