title: What is the difference between casting to `i32` from `usize` versus the other way?
body: <p>I am making a function that makes a array of size n random numbers but my comparison for the while throws an error.</p>
  
  <pre><code>while ar.len() as i32 &lt; size { }
  </code></pre>
  
  <p>Complains with: expected one of <code>!</code>, <code>(</code>, <code>+</code>, <code>,</code>, <code>::</code>, <code>&lt;</code>, or <code>&gt;</code>, found <code>{</code>.</p>
  
  <p>If I remove the <code>as i32</code> it complains with <code>mismatch types</code> and if I add a <code>as usize</code> to the size variable then it doesn't complain.</p>