diff options
author | Yuki Okushi <jtitor@2k36.org> | 2023-04-20 17:03:23 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-20 17:03:23 +0900 |
commit | df3aca2af634274b0997068fa81fe5d9cc04d860 (patch) | |
tree | 71f7f26da4a3b85486a622895baffd5298f0a4b2 /tests/rustdoc-js-std/parser-errors.js | |
parent | 7fde08365c4c3cfc9a9f8a6a02693b789adbe6da (diff) | |
parent | 4e2797dd76363370eac74cc9480e7d8c0ff17b4b (diff) | |
download | rust-df3aca2af634274b0997068fa81fe5d9cc04d860.tar.gz |
Rollup merge of #102341 - jmillikin:nonzero-impl-neg, r=dtolnay
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 impls for two stable types can't be marked unstable.
See discussion on https://github.com/rust-lang/libs-team/issues/105 for additional context.
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions