title: fold is picky about closures it accepts
body: <p>(rust noob here; I'm trying to understand what can/cannot/should/shouldn't be passed by reference in a higher order function situation)</p>
  <pre><code>let a = [1, 2, 3];
  </code></pre>
  <p>This invocation works:</p>
  <pre><code>let sum = a.iter().fold(0, |acc:  i32, x: &amp;i32| acc + x);
  </code></pre>
  <p>These do not:</p>
  <pre><code>let sum = a.iter().fold(0, |acc: i32, x: i32| acc + x);
  let sum = a.iter().fold(0, |acc: &amp;i32, x: i32| acc + x);
  </code></pre>
  <p>The error message is</p>
  <pre><code>error[E0631]: type mismatch in closure arguments
   --&gt; main.rs:8:22
    |
  8 |   let sum = a.iter().fold(0, |acc: &amp;i32, x: i32| acc + x);
    |                      ^^^^    --------------------------- found signature of `for&lt;'r&gt; fn(&amp;'r i32, i32) -&gt; _`
    |                      |
    |                      expected signature of `fn({integer}, &amp;{integer}) -&gt; _`
  
  error: aborting due to previous error
  
  For more information about this error, try `rustc --explain E0631`.
  </code></pre>
  <p>The explanation does not offer anything of interest. It says the arguments of the closure do not match those of the arguments of <code>fold</code>. I however cannot see how it follows from the declaration of <code>fold</code>:</p>
  <pre><code>fn fold&lt;B, F&gt;(self, init: B, f: F) -&gt; B
  where
      F: FnMut(B, Self::Item) -&gt; B
  </code></pre>
  <p>Why is the second argument supposed to be <code>&amp;{integer}</code>, and the first one <code>{integer}</code>?</p>