about summary refs log tree commit diff
diff options
context:
space:
mode:
authormgr-inz-rafal <rchabowski@gmail.com>2019-12-28 17:14:19 +0100
committermgr-inz-rafal <rchabowski@gmail.com>2019-12-28 17:14:19 +0100
commita208906afb950d26c6acd770b8650bc840ad35dc (patch)
treef0e6ee0dbbba24fbe56530d7243c268a18471ae6
parent6223391170de2ed0756e50d122039d1805510f0f (diff)
downloadrust-a208906afb950d26c6acd770b8650bc840ad35dc.tar.gz
rust-a208906afb950d26c6acd770b8650bc840ad35dc.zip
Fixes for elided lifetimes
-rw-r--r--clippy_lints/src/modulo_arithmetic.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/clippy_lints/src/modulo_arithmetic.rs b/clippy_lints/src/modulo_arithmetic.rs
index 308bb00fe76..09c3ce8d028 100644
--- a/clippy_lints/src/modulo_arithmetic.rs
+++ b/clippy_lints/src/modulo_arithmetic.rs
@@ -37,7 +37,7 @@ struct OperandInfo {
     is_integral: bool,
 }
 
-fn analyze_operand(operand: &Expr, cx: &LateContext<'_, '_>, expr: &Expr) -> Option<OperandInfo> {
+fn analyze_operand(operand: &Expr<'_>, cx: &LateContext<'_, '_>, expr: &Expr<'_>) -> Option<OperandInfo> {
     match constant(cx, cx.tables, operand) {
         Some((Constant::Int(v), _)) => match cx.tables.expr_ty(expr).kind {
             ty::Int(ity) => {
@@ -82,7 +82,7 @@ fn might_have_negative_value(t: &ty::TyS<'_>) -> bool {
 
 fn check_const_operands<'a, 'tcx>(
     cx: &LateContext<'a, 'tcx>,
-    expr: &'tcx Expr,
+    expr: &'tcx Expr<'_>,
     lhs_operand: &OperandInfo,
     rhs_operand: &OperandInfo,
 ) {
@@ -106,7 +106,7 @@ fn check_const_operands<'a, 'tcx>(
     }
 }
 
-fn check_non_const_operands<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr, operand: &Expr) {
+fn check_non_const_operands<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr<'_>, operand: &Expr<'_>) {
     let operand_type = cx.tables.expr_ty(operand);
     if might_have_negative_value(operand_type) {
         span_lint_and_then(
@@ -125,7 +125,7 @@ fn check_non_const_operands<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, expr: &'tcx Ex
 }
 
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ModuloArithmetic {
-    fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
+    fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr<'_>) {
         match &expr.kind {
             ExprKind::Binary(op, lhs, rhs) | ExprKind::AssignOp(op, lhs, rhs) => {
                 if let BinOpKind::Rem = op.node {