You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However as far as I can see it is nowhere actually specified what arithmetic is supposed to do when overflow-checks is turned off, or whether this is subject to change, hardware specifics, etc.
The text was updated successfully, but these errors were encountered:
In the case of implicitly-wrapped overflow, implementations must provide well-defined (even if still considered erroneous) results by using two’s complement overflow conventions.
But I think it would be better if the "Operator expressions" page said this.
I suspect that the sentence "Remember that signed integers are always represented using two's complement." was intended to convey this information (partly because I can't see what else it's doing there).
But I don't think that's a good way of saying it. It would be better to be more direct.
It is documented what the semantics are of basic arithmetic when
overflow-checks
is turned on: https://doc.rust-lang.org/reference/expressions/operator-expr.html#overflow.However as far as I can see it is nowhere actually specified what arithmetic is supposed to do when
overflow-checks
is turned off, or whether this is subject to change, hardware specifics, etc.The text was updated successfully, but these errors were encountered: