Fix example code for unreachable!

The previous code was giving an incorrect result (not x/3).
auto merge of #19360 : olivren/rust/master, r=Gankro

The previous code was giving an incorrect result (not x/3).

Also, this function does not work with signed integers. It now accepts `u32` instead of `i32`.