@@ -355,7 +355,7 @@ impl<'tcx> LateLintPass<'tcx> for Dereferencing {
355355 }
356356}
357357
358- fn try_parse_ref_op (
358+ fn try_parse_ref_op < ' tcx > (
359359 tcx : TyCtxt < ' tcx > ,
360360 typeck : & ' tcx TypeckResults < ' _ > ,
361361 expr : & ' tcx Expr < ' _ > ,
@@ -387,7 +387,7 @@ fn try_parse_ref_op(
387387
388388// Checks whether the type for a deref call actually changed the type, not just the mutability of
389389// the reference.
390- fn deref_method_same_type ( result_ty : Ty < ' tcx > , arg_ty : Ty < ' tcx > ) -> bool {
390+ fn deref_method_same_type ( result_ty : Ty < ' _ > , arg_ty : Ty < ' _ > ) -> bool {
391391 match ( result_ty. kind ( ) , arg_ty. kind ( ) ) {
392392 ( ty:: Ref ( _, result_ty, _) , ty:: Ref ( _, arg_ty, _) ) => TyS :: same_type ( result_ty, arg_ty) ,
393393
@@ -457,7 +457,7 @@ fn is_linted_explicit_deref_position(parent: Option<Node<'_>>, child_id: HirId,
457457}
458458
459459/// Adjustments are sometimes made in the parent block rather than the expression itself.
460- fn find_adjustments (
460+ fn find_adjustments < ' tcx > (
461461 tcx : TyCtxt < ' tcx > ,
462462 typeck : & ' tcx TypeckResults < ' _ > ,
463463 expr : & ' tcx Expr < ' _ > ,
@@ -499,7 +499,7 @@ fn find_adjustments(
499499}
500500
501501#[ allow( clippy:: needless_pass_by_value) ]
502- fn report ( cx : & LateContext < ' tcx > , expr : & ' tcx Expr < ' _ > , state : State , data : StateData ) {
502+ fn report ( cx : & LateContext < ' _ > , expr : & Expr < ' _ > , state : State , data : StateData ) {
503503 match state {
504504 State :: DerefMethod {
505505 ty_changed_count,
@@ -568,7 +568,7 @@ fn report(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, state: State, data: Stat
568568}
569569
570570impl Dereferencing {
571- fn check_local_usage ( & mut self , cx : & LateContext < ' tcx > , e : & ' tcx Expr < ' _ > , local : HirId ) {
571+ fn check_local_usage ( & mut self , cx : & LateContext < ' _ > , e : & Expr < ' _ > , local : HirId ) {
572572 if let Some ( outer_pat) = self . ref_locals . get_mut ( & local) {
573573 if let Some ( pat) = outer_pat {
574574 // Check for auto-deref
0 commit comments