title: Why does .step_by() expect a usize?
body: <p>I am trying to implement a function with nested for loops. I am having trouble with the <code>.step_by()</code> function, however.
  Here is my code:</p>
  <pre><code>fn get_prime_factors_below(n: i32) -&gt; HashMap&lt;i32, Vec&lt;i32&gt;&gt; {
      for i in 2..n / 2 + 1 {
          for j in (i * 2..n).step_by(i) {
              //
          }
      }
  
      return factors;
  }
  </code></pre>
  <p>This returns the following error when I try to compile it:</p>
  <pre><code> for j in (i * 2..n).step_by(i) {
                       ------- ^ expected `usize`, found `i32`
                       |
                       arguments to this function are incorrect
  </code></pre>
  <p>Why does <code>.step_by()</code> expect a <code>usize</code> and doesn't work with an <code>i32</code>?</p>