Skip to content

Instantly share code, notes, and snippets.

@Kimundi
Last active December 10, 2015 22:49
Show Gist options
  • Select an option

  • Save Kimundi/4505195 to your computer and use it in GitHub Desktop.

Select an option

Save Kimundi/4505195 to your computer and use it in GitHub Desktop.
use core::num::Num::*;
fn main() {
let x: float = Num::from_int(7);
}
-----------------------------------------------------------------
outputs:
test-prelude.rs:4:19: 4:32 error: unresolved name
test-prelude.rs:4 let x: float = Num::from_int(7);
^~~~~~~~~~~~~
test-prelude.rs:4:19: 4:32 error: use of undeclared module `Num`
test-prelude.rs:4 let x: float = Num::from_int(7);
^~~~~~~~~~~~~
test-prelude.rs:4:19: 4:32 error: unresolved name: Num::from_int
test-prelude.rs:4 let x: float = Num::from_int(7);
^~~~~~~~~~~~~
error: aborting due to 3 previous errors
----------------------------------------------------------------
at commit:
Author: Graydon Hoare <[email protected]>
Date: Wed Jan 9 10:43:16 2013 -0800
rustc: more arch-specific fallout from 2db3abd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment