title: Rust error: unable to infer enough type information to locate the impl of the trait
body: <p>I don't quite understand why this is ok</p>
  
  <pre><code>use std::num;
  
  fn main() {
      let mut p_: int = num::pow(16, 2);
      let mut p: f64 = p_ as f64;
  }
  </code></pre>
  
  <p>but this is failing</p>
  
  <pre><code>use std::num;
  
  fn main() {
      let mut p: f64 = num::pow(16, 2) as f64;
  }
  </code></pre>
  
  <p>with error</p>
  
  <pre><code>error: unable to infer enough type information to locate the impl of the trait `core::num::Int` for the type `_`; type annotations required
  let mut p: f64 = num::pow(16, 2) as f64;
                   ^~~~~~~~
  </code></pre>
  
  <p>For the sake of context, this is what I'm trying to do (pi approximation):</p>
  
  <pre><code>fn main() {
      let mut pi: f64 = 0.0;
      let precision: int = 10;
  
      for i in range(0, precision) {
          let k = i as f64;
          let mut pi16: int = num::pow(16, i as uint);
          let mut p16: f64 = pi16 as f64;
          pi += 1.0/p16 * (4.0/(8.0 * k + 1.0) - 2.0/(8.0 * k + 4.0) - 1.0/(8.0 * k + 5.0) - 1.0/(8.0 * k + 6.0));
      }
  }
  </code></pre>
  
  <p>I'm using <code>rustc 0.13.0-nightly (f09279395 2014-11-17 17:22:06 +0000)</code></p>