All signed rust integer types has an unsgined_abs function, e.g. (-7_i32).unsigned_abs() == 7_u32, which is there to correctly handle i32::MIN (which cannot be negated as a i32).
I suggest we either add this to PrimInt (returning identify for unsigned integers), or add a new UnsignedAbs trait for this.
I'd be happy to make a PR if this sounds good.
All signed rust integer types has an
unsgined_absfunction, e.g.(-7_i32).unsigned_abs() == 7_u32, which is there to correctly handlei32::MIN(which cannot be negated as ai32).I suggest we
either add this toadd a newPrimInt(returning identify for unsigned integers), orUnsignedAbstrait for this.I'd be happy to make a PR if this sounds good.