title: Result of Iterator::max does not live long enough although the item is returned directly
body: <p>This code (<a href="https://play.rust-lang.org/?gist=08f99d1231c549f9676624bc10c9e687&amp;version=stable&amp;backtrace=0" rel="nofollow">Playground</a>):</p>
  
  <pre><code>let max = {
      let mut v = vec![3, 1, 5, 1, 5, 9, 2, 6];
      v.iter().max().unwrap()
  };
  println!("{}", max);
  </code></pre>
  
  <p>... leads to this error:</p>
  
  <pre><code>&lt;anon&gt;:4:9: 4:10 error: `v` does not live long enough
  &lt;anon&gt;:4         v.iter().max().unwrap()
                   ^
  &lt;anon&gt;:5:7: 7:2 note: reference must be valid for the block suffix following statement 0 at 5:6...
  &lt;anon&gt;:5     };
  &lt;anon&gt;:6     println!("{}", max);
  &lt;anon&gt;:7 }
  &lt;anon&gt;:3:50: 5:6 note: ...but borrowed value is only valid for the block suffix following statement 0 at 3:49
  &lt;anon&gt;:3         let mut v = vec![3, 1, 5, 1, 5, 9, 2, 6];
  &lt;anon&gt;:4         v.iter().max().unwrap()
  &lt;anon&gt;:5     };
  </code></pre>
  
  <p>I don't understand this error: <a href="http://doc.rust-lang.org/std/iter/trait.Iterator.html#method.max" rel="nofollow"><code>Iterator::max</code></a> returns <code>Option&lt;Self::Item&gt;</code>, and not <code>Option&lt;&amp;Self::Item&gt;</code>, so max shouldn't be a reference and hence everything should be fine...</p>