[rust-dev] Warn about implicit integer conversion

Michael Neumann mneumann at ntecs.de
Tue Dec 18 10:35:51 PST 2012


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?

Best,

   Michael


More information about the Rust-dev mailing list