[rust-dev] Integer overflow, round -2147483648

Vadim Chugunov vadimcn at gmail.com
Wed Jun 25 15:04:39 PDT 2014


I wasn't thinking of subtyping u32w to u32.  I actually don't think that
u32 should be convertible to u32w (or vice-versa) without an explicit
cast.   For array slices, it would have to be a transmute-like function,
e.g. fn as_wrapping<'a>(s:&'a [u32])->&'a [u32w] { unsafe { transmute(s) } }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140625/fff4ff7d/attachment.html>


More information about the Rust-dev mailing list