To elaborate slightly on what my sibling commentors have said:
Rust has a feature called "debug assertions". This is a compile-time option to configure, well, debug assertions.
Rust-the-language says that when debug assertions are turned on, overflow checks must be in place, and will panic. When debug assertions are not on, overflow is considered a "program error", and while implementations are not required to do the check, they may. if they do not, they must implement two's compliment wrapping.
rustc currently does not check when debug assertions are off.
Cargo has the concept of "build profiles", and there are a number of different ones. By default, "cargo build" executes a "debug profile" build, which, by default, has debug assertions on. "cargo build --release" executes a "release profile" build, which, by default, as debug assertions off.
If you want wrapping behavior, use https://doc.rust-lang.org/stable/std/num/struct.Wrapping.htm...