rust/library/core/src/num
Yuki Okushi 91ea1cbc17
Rollup merge of #80959 - jhpratt:unsigned_abs-stabilization, r=m-ou-se
Stabilize `unsigned_abs`

Resolves #74913.

This PR stabilizes the `i*::unsigned_abs()` method, which returns the absolute value of an integer _as its unsigned equivalent_. This has the advantage that it does not overflow on `i*::MIN`.

I have gone ahead and used this in a couple locations throughout the repository.
2021-01-30 13:36:44 +09:00
..
dec2flt Rollup merge of #80959 - jhpratt:unsigned_abs-stabilization, r=m-ou-se 2021-01-30 13:36:44 +09:00
flt2dec rename MaybeUninit slice methods 2020-09-05 17:24:22 +02:00
shells Deprecate-in-future the constants superceded by RFC 2700 2021-01-20 20:08:11 -05:00
bignum.rs Use T::BITS instead of size_of::<T> * 8. 2020-09-19 06:54:42 +02:00
diy_float.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
error.rs Apply suggested changes 2020-10-26 18:14:12 +00:00
f32.rs Deprecate-in-future the constants superceded by RFC 2700 2021-01-20 20:08:11 -05:00
f64.rs Deprecate-in-future the constants superceded by RFC 2700 2021-01-20 20:08:11 -05:00
int_macros.rs Rollup merge of #80959 - jhpratt:unsigned_abs-stabilization, r=m-ou-se 2021-01-30 13:36:44 +09:00
mod.rs Remove all doc_comment!{} hacks by using #[doc = expr] where needed. 2020-12-30 22:49:08 +01:00
nonzero.rs Add NonZeroUn::is_power_of_two 2021-01-16 19:27:51 -08:00
uint_macros.rs Deprecate-in-future the constants superceded by RFC 2700 2021-01-20 20:08:11 -05:00
wrapping.rs Remove all doc_comment!{} hacks by using #[doc = expr] where needed. 2020-12-30 22:49:08 +01:00