Skip to content

Instantly share code, notes, and snippets.

Created May 24, 2012 18:57
Show Gist options
  • Save anonymous/2783543 to your computer and use it in GitHub Desktop.
Save anonymous/2783543 to your computer and use it in GitHub Desktop.
Rustic REPL scratch file
/*
rustc 0.2 (2223e8b 2012-05-23 10:28:13 -0500)
host: i686-unknown-linux-gnu
*/
use std;
fn main() {
// Maximum legal range of each i* literal
log(error, 128i8); // should be 127
log(error, 2048i16); // should be 32767 (!!!!)
log(error, 2147483648i32); // should be 2147483647
log(error, 9223372036854775808i64); // should be 9223372036854775807
// Transient:
}
rust: -128
rust: 2048
rust: -2147483648
rust: -9223372036854775808
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment