Somewhere between 0.5 and
rustc 0.6 (09bb07b 2012-12-24 18:29:02 -0800)
host: x86_64-unknown-linux-gnu
The program below started printing 16959 instead of 999999 (16959 ==
999999 & 0xFFFF). It seems rustc has decided to use a 16-bit integer,
even though the constant doesn't even fit.
fn main() {
let mut count = 0;
for 999_999.times() {
count += 1;
}
io::println(fmt!("%u", count));
}
Is this known, or should I file a ticket?
David
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev