-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Add cast_signed
and cast_unsigned
methods for NonZero
types
#136511
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 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.
3 tasks
This comment has been minimized.
This comment has been minimized.
b0ee4f5
to
f4a92e3
Compare
(Had a local fix I hadn't committed and pushed. Pushed now.) |
dtolnay
approved these changes
Feb 3, 2025
@bors r+ |
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.