-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Add cast_signed and cast_unsigned methods for NonZero types
#136511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
bors
merged 2 commits into
rust-lang:master
from
joshtriplett:nonzero-cast-signed-unsigned
Feb 4, 2025
Merged
Add cast_signed and cast_unsigned methods for NonZero types
#136511
bors
merged 2 commits into
rust-lang:master
from
joshtriplett:nonzero-cast-signed-unsigned
Feb 4, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ing signed type There was a macro parameter giving signed impls access to the corresponding unsigned type, but not the other way around. This will allow implementing methods converting in both directions.
Collaborator
3 tasks
This comment has been minimized.
This comment has been minimized.
b0ee4f5 to
f4a92e3
Compare
Member
Author
|
(Had a local fix I hadn't committed and pushed. Pushed now.) |
dtolnay
approved these changes
Feb 3, 2025
Member
|
@bors r+ |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 4, 2025
Rollup of 6 pull requests Successful merges: - rust-lang#136398 (add UnsafeCell direct access APIs) - rust-lang#136465 (Some `rustc_middle` cleanups) - rust-lang#136479 (std::fs: further simplify dirent64 handling) - rust-lang#136504 (Fix last compare-mode false negatives in tests) - rust-lang#136511 (Add `cast_signed` and `cast_unsigned` methods for `NonZero` types) - rust-lang#136518 (Add note about `FnPtr` trait being exposed as public bound) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 4, 2025
Rollup merge of rust-lang#136511 - joshtriplett:nonzero-cast-signed-unsigned, r=dtolnay Add `cast_signed` and `cast_unsigned` methods for `NonZero` types Requested in rust-lang#125882 . Note that this keeps the same names as the methods currently present on other integer types. If we want to rename them, we can rename them all at the same time.
github-actions bot
pushed a commit
to tautschnig/verify-rust-std
that referenced
this pull request
Mar 11, 2025
Requested in #125882 .
Note that this keeps the same names as the methods currently present on other
integer types. If we want to rename them, we can rename them all at the same
time.