Closed
Description
https://gist.github.com/2783543
The maximum legal value of signed integers of length x
should be (2^(x-1)) - 1
, but in most cases Rust allows signed literals of value 2^(x-1)
, but then interprets those literals as the minimum legal value (see the output in the gist above).
The exception is i16
, which exhibits the same behavior as above, except that, bafflingly, x
is 12 rather than 16.
EDIT: wrong equations
Metadata
Metadata
Assignees
Labels
No labels