2 ms·
I've never used rust, but from what I've heard, it crashes in debug mode, and wraps (two's complement) in release mode.
by Thorrez 8y ago
I've never used rust, but from what I've heard, it crashes in debug mode, and wraps (two's complement) in release mode.
- deleted 8y ago[deleted]
- steveklabnik 8y agoThat’s the default semantics, yes.
- vardump 8y ago> it crashes in debug mode, and wraps (two's complement) in release mode. Well, that's indeed a nice feature in debug mode. Mostly wraparound is undesired and wraparound bugs are pretty common. Shame the performance cost is too much to do same in release. Whenever wraparound semantics it is actually wanted, one can use an appropriate type.