title: Why does iterating a vector of i32s give references to i32 (&i32)?
body: <p>The following program tries to grade the marks of a student:</p>
  <pre><code>use std::io;
  
  fn main() {
      let mut in0 = String::new();
      io::stdin().read_line(&amp;mut in0).expect(&quot;stdin err&quot;);
      let n: i32 = in0.trim().parse().expect(&quot;parse err&quot;);
      println!(&quot;{}&quot;, n);
      let mut v: Vec&lt;i32&gt; = Vec::new();
      for _ in 0..n {
          let mut inp = String::new();
          io::stdin().read_line(&amp;mut inp).expect(&quot;stdin err&quot;);
          let num: i32 = inp.trim().parse().unwrap();
          v.push(num);
      }
      let out: Vec&lt;_&gt; = v
          .iter()
          .map(|x| {
              if x &lt; 38 {
                  x
              } else if x % 5 &gt; 3 {
                  x + x % 5
              } else {
                  x
              }
          })
          .collect();
      println!(&quot;{:?}&quot;, v);
  }
  </code></pre>
  <p>While compiling, I get the following error.</p>
  <pre class="lang-none prettyprint-override"><code>error[E0308]: mismatched types
    --&gt; src/main.rs:19:20
     |
  19 |             if x &lt; 38 {
     |                    ^^
     |                    |
     |                    expected `&amp;i32`, found integer
     |                    help: consider borrowing here: `&amp;38`
  
  error[E0308]: `if` and `else` have incompatible types
    --&gt; src/main.rs:24:17
     |
  21 |               } else if x % 5 &gt; 3 {
     |  ____________________-
  22 | |                 x + x % 5
     | |                 --------- expected because of this
  23 | |             } else {
  24 | |                 x
     | |                 ^ expected `i32`, found `&amp;i32`
  25 | |             }
     | |_____________- `if` and `else` have incompatible types
     |
  help: consider dereferencing the borrow
     |
  23 |             } else *{
  24 |                 x
  25 |             }
  </code></pre>
  <p>How is the <code>x</code> variable a <code>&amp;i32</code> type and not a <code>i32</code> type?</p>