title: "type annotations needed" / "cannot infer type" when calling Iterator::collect
body: <p>Why does this</p>
  
  <pre><code>fn main() {
      let test = "5% of foo".to_string();
      let result: i32 = test.split('%').collect()[0].parse().unwrap_or(0);
  }
  </code></pre>
  
  <p>cause an error </p>
  
  <pre class="lang-none prettyprint-override"><code>error[E0282]: type annotations needed
   --&gt; src/main.rs:4:23
    |
  4 |     let result: i32 = test.split('%').collect()[0].parse().unwrap_or(0);
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for `B`
  </code></pre>
  
  <p>This doesn't help either:</p>
  
  <pre><code>let result: i32 = test.to_string().split('%').collect()[0].parse().unwrap_or(0i32);
  </code></pre>