rust/library/core/src/num
John Millikin 4e2797dd76 Implement Neg for signed non-zero integers.
Negating a non-zero integer currently requires unpacking to a
primitive and re-wrapping. Since negation of non-zero signed
integers always produces a non-zero result, it is safe to
implement `Neg` for `NonZeroI{N}`.

The new `impl` is marked as stable because trait implementations
for two stable types can't be marked unstable.
2023-04-20 14:27:29 +09:00
..
dec2flt Improve the floating point parser in dec2flt. 2023-04-10 00:47:08 +02:00
flt2dec Fix inconsistent rounding of 0.5 when formatted to 0 decimal places 2022-10-11 23:09:23 +02:00
shells Fix wrong type in docs: i16 -> u16 2023-04-07 23:49:20 +02:00
bignum.rs Rename integer log* methods to ilog* 2022-08-09 10:20:49 -07:00
diy_float.rs Fix assert in diy_float 2021-07-27 16:02:35 -04:00
error.rs rm const traits in libcore 2023-04-16 06:49:27 +00:00
f32.rs Auto merge of #101959 - Xaeroxe:clamp-better-assert, r=ChrisDenton 2023-04-14 10:44:36 +00:00
f64.rs Auto merge of #101959 - Xaeroxe:clamp-better-assert, r=ChrisDenton 2023-04-14 10:44:36 +00:00
fmt.rs Fix a bunch of typos 2021-12-14 16:40:43 +01:00
int_log10.rs Have a function for the log(0) panic, rather than copy-pasting the string constant 2023-02-10 12:50:17 -08:00
int_macros.rs fix codegen difference 2023-04-17 09:27:07 +00:00
mod.rs fix codegen difference 2023-04-17 09:27:07 +00:00
nonzero.rs Implement Neg for signed non-zero integers. 2023-04-20 14:27:29 +09:00
saturating.rs Unimpl {Add,Sub,Mul,Div,Rem,BitXor,BitOr,BitAnd}<$t> for Saturating<$t> 2022-01-26 23:49:54 +01:00
uint_macros.rs fix codegen difference 2023-04-17 09:27:07 +00:00
wrapping.rs rm const traits in libcore 2023-04-16 06:49:27 +00:00