title: error with % operator inside closure
body: <p>This code</p>
  
  <pre><code>let vec = vec![1, 3, 4, 5, 6];
  for i in vec.iter().filter(|x| x % 2 == 0) {
      println!("{}", i);
  }
  </code></pre>
  
  <p>Produces the error</p>
  
  <pre class="lang-none prettyprint-override"><code>&lt;anon&gt;:4:36: 4:37 error: binary operation `%` cannot be applied to type `&amp;&amp;_` [E0369]
  &lt;anon&gt;:4     for i in vec.iter().filter(|x| x % 2 == 0) {
                                              ^
  </code></pre>
  
  <p>I cannot understand the meaning of this error. Is this related to how the anonymous closure structure is created by the compiler?</p>
  
  <p>The following code seems to be working.</p>
  
  <pre><code>for i in vec.iter().filter(|&amp;x| x % 2 == 0) {
  </code></pre>