]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/methods/iterator_step_by_zero.rs
Auto merge of #84071 - nagisa:nixos-patching-fix, r=Mark-Simulacrum
[rust.git] / src / tools / clippy / clippy_lints / src / methods / iterator_step_by_zero.rs
index 3baa580314f337d98d1e947ea7fba25bcd0989d1..06b12998b1aae958fe22a34e16189fd1711161de 100644 (file)
@@ -7,9 +7,9 @@
 
 use super::ITERATOR_STEP_BY_ZERO;
 
-pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &hir::Expr<'_>, args: &'tcx [hir::Expr<'_>]) {
+pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &hir::Expr<'_>, arg: &'tcx hir::Expr<'_>) {
     if is_trait_method(cx, expr, sym::Iterator) {
-        if let Some((Constant::Int(0), _)) = constant(cx, cx.typeck_results(), &args[1]) {
+        if let Some((Constant::Int(0), _)) = constant(cx, cx.typeck_results(), arg) {
             span_lint(
                 cx,
                 ITERATOR_STEP_BY_ZERO,