rust/library/core
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
..
benches Auto merge of #108157 - scottmcm:tuple-gt-via-partialcmp, r=dtolnay 2023-03-05 22:02:26 +00:00
primitive_docs Add primitive documentation to libcore 2021-09-12 02:23:08 +00:00
src Implement Neg for signed non-zero integers. 2023-04-20 14:27:29 +09:00
tests Implement Neg for signed non-zero integers. 2023-04-20 14:27:29 +09:00
Cargo.toml Update rand in the stdlib tests, and remove the getrandom feature from it 2023-01-04 14:52:41 -08:00