I'm testing code in the kernel and if I rust say this,
let mut cbreak:u32 = <u32>::max_value();
cbreak += 1;
println!("Done... {}", cbreak);
and run it it shows "Done... 0", which is correct. However, if I try to do it in a standard rust installation on my pc for example (outside of Tock), it says
thread 'main' panicked at 'attempt to add with overflow', rec.rs:117:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Should I know allow addition and subtraction overflow as seen in the first example? If so, is there a way to disable the panic outside of Tock?