It's technically not a "bug" in Rust or C++, it's undefined behaviour, which is much worse than a bug! (and it's never correct behaviour)
In C/C++ it's "only" UB for signed ints.
For unsigned ints it's arithmetic modulo 2^n (where n is the number of bits in the value representation of that particular size of integer).
Such divergent definitions make the whole mess of course even bigger, that's not the point.
This would be possible only if the standard would define the behavior in question as implementation defined. But that's not the case afaik.
Signed overflow is undefined behavior as it's afaik defined to be that. But maybe I'm just wrong here?
But at least SO is confining my knowledge:
https://stackoverflow.com/questions/16188263/is-signed-integ...