diff options
| author | John Millikin <john@john-millikin.com> | 2022-09-27 11:40:39 +0900 |
|---|---|---|
| committer | John Millikin <john@john-millikin.com> | 2023-04-20 14:27:29 +0900 |
| commit | 4e2797dd76363370eac74cc9480e7d8c0ff17b4b (patch) | |
| tree | 509fe2f357fc7270af5aa2a9cd9f65a6c2410c72 /tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs | |
| parent | dc730521efad6acf9b31fcc99c8a26789fa9a654 (diff) | |
| download | rust-4e2797dd76363370eac74cc9480e7d8c0ff17b4b.tar.gz rust-4e2797dd76363370eac74cc9480e7d8c0ff17b4b.zip | |
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.
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions
