This fails to compile on 32-bit platforms with an overflow error ("attempt to shift right by 32_i32 which would overflow").
I think it would be highly unlikely for any value to be in the billions. Alternatively it can be rewritten to something like `assert!(val <= u32::MAX as usize);`.