@@ -37,7 +37,7 @@ struct OperandInfo {
3737 is_integral : bool ,
3838}
3939
40- fn analyze_operand ( operand : & Expr , cx : & LateContext < ' _ , ' _ > , expr : & Expr ) -> Option < OperandInfo > {
40+ fn analyze_operand ( operand : & Expr < ' _ > , cx : & LateContext < ' _ , ' _ > , expr : & Expr < ' _ > ) -> Option < OperandInfo > {
4141 match constant ( cx, cx. tables , operand) {
4242 Some ( ( Constant :: Int ( v) , _) ) => match cx. tables . expr_ty ( expr) . kind {
4343 ty:: Int ( ity) => {
@@ -82,7 +82,7 @@ fn might_have_negative_value(t: &ty::TyS<'_>) -> bool {
8282
8383fn check_const_operands < ' a , ' tcx > (
8484 cx : & LateContext < ' a , ' tcx > ,
85- expr : & ' tcx Expr ,
85+ expr : & ' tcx Expr < ' _ > ,
8686 lhs_operand : & OperandInfo ,
8787 rhs_operand : & OperandInfo ,
8888) {
@@ -106,7 +106,7 @@ fn check_const_operands<'a, 'tcx>(
106106 }
107107}
108108
109- fn check_non_const_operands < ' a , ' tcx > ( cx : & LateContext < ' a , ' tcx > , expr : & ' tcx Expr , operand : & Expr ) {
109+ fn check_non_const_operands < ' a , ' tcx > ( cx : & LateContext < ' a , ' tcx > , expr : & ' tcx Expr < ' _ > , operand : & Expr < ' _ > ) {
110110 let operand_type = cx. tables . expr_ty ( operand) ;
111111 if might_have_negative_value ( operand_type) {
112112 span_lint_and_then (
@@ -125,7 +125,7 @@ fn check_non_const_operands<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, expr: &'tcx Ex
125125}
126126
127127impl < ' a , ' tcx > LateLintPass < ' a , ' tcx > for ModuloArithmetic {
128- fn check_expr ( & mut self , cx : & LateContext < ' a , ' tcx > , expr : & ' tcx Expr ) {
128+ fn check_expr ( & mut self , cx : & LateContext < ' a , ' tcx > , expr : & ' tcx Expr < ' _ > ) {
129129 match & expr. kind {
130130 ExprKind :: Binary ( op, lhs, rhs) | ExprKind :: AssignOp ( op, lhs, rhs) => {
131131 if let BinOpKind :: Rem = op. node {
0 commit comments