On 12/18/2012 10:35 AM, Michael Neumann wrote:
Hi,
let a: u8 = 10_000; // this does not fit inside u8!
io::println(fmt!("%?", a)); // print "10"
I would have expected that rust would warn me if I try to assign an
integer constant that doesn't fit into the types range.
Maybe there exists a warning that I can enable?
This is a surprise to me too. Perhaps the compiler just doesn't do this
check yet. There is a lint check called type_limits that is enabled by
default but it only deals with comparison operators.
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev