@@ -147,7 +147,7 @@ impl<'tcx> LateLintPass<'tcx> for Ranges {
147147 if let ExprKind :: MethodCall ( ref iter_path, _, ref iter_args , _) = * iter;
148148 if iter_path. ident. name == sym!( iter) ;
149149 // range expression in `.zip()` call: `0..x.len()`
150- if let Some ( higher:: Range { start: Some ( start) , end: Some ( end) , .. } ) = higher:: range( cx , zip_arg) ;
150+ if let Some ( higher:: Range { start: Some ( start) , end: Some ( end) , .. } ) = higher:: range( zip_arg) ;
151151 if is_integer_const( cx, start, 0 ) ;
152152 // `.len()` call
153153 if let ExprKind :: MethodCall ( ref len_path, _, ref len_args, _) = end. kind;
@@ -180,7 +180,7 @@ fn check_exclusive_range_plus_one(cx: &LateContext<'_>, expr: &Expr<'_>) {
180180 start,
181181 end: Some ( end) ,
182182 limits: RangeLimits :: HalfOpen
183- } ) = higher:: range( cx , expr) ;
183+ } ) = higher:: range( expr) ;
184184 if let Some ( y) = y_plus_one( cx, end) ;
185185 then {
186186 let span = if expr. span. from_expansion( ) {
@@ -225,7 +225,7 @@ fn check_exclusive_range_plus_one(cx: &LateContext<'_>, expr: &Expr<'_>) {
225225// inclusive range minus one: `x..=(y-1)`
226226fn check_inclusive_range_minus_one ( cx : & LateContext < ' _ > , expr : & Expr < ' _ > ) {
227227 if_chain ! {
228- if let Some ( higher:: Range { start, end: Some ( end) , limits: RangeLimits :: Closed } ) = higher:: range( cx , expr) ;
228+ if let Some ( higher:: Range { start, end: Some ( end) , limits: RangeLimits :: Closed } ) = higher:: range( expr) ;
229229 if let Some ( y) = y_minus_one( cx, end) ;
230230 then {
231231 span_lint_and_then(
@@ -279,7 +279,7 @@ fn check_reversed_empty_range(cx: &LateContext<'_>, expr: &Expr<'_>) {
279279 }
280280
281281 if_chain ! {
282- if let Some ( higher:: Range { start: Some ( start) , end: Some ( end) , limits } ) = higher:: range( cx , expr) ;
282+ if let Some ( higher:: Range { start: Some ( start) , end: Some ( end) , limits } ) = higher:: range( expr) ;
283283 let ty = cx. typeck_results( ) . expr_ty( start) ;
284284 if let ty:: Int ( _) | ty:: Uint ( _) = ty. kind;
285285 if let Some ( ( start_idx, _) ) = constant( cx, cx. typeck_results( ) , start) ;
0 commit comments