Closed
Description
see http://stackoverflow.com/questions/31208465/pi-constant-is-ambiguous
fn main() {
let _ = f32::consts::PI;
}
fails to compile with:
$ rustc -
<anon>:2:13: 2:28 error: ambiguous associated type; specify the type using the syntax `<f32 as Trait>::consts` [E0223]
<anon>:2 let i = f32::consts::PI;
^~~~~~~~~~~~~~~
error: aborting due to previous error
on rust 1.0 stable and 1.1 stable
using the full path std::f32::consts::PI;
works. The compilation error looks wrong (why is f32 an associated type)?