Skip to content
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

Tracking Issue for nonzero_bitwise #128281

Open
3 tasks
pitaj opened this issue Jul 27, 2024 · 0 comments
Open
3 tasks

Tracking Issue for nonzero_bitwise #128281

pitaj opened this issue Jul 27, 2024 · 0 comments
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@pitaj
Copy link
Contributor

pitaj commented Jul 27, 2024

Feature gate: #![feature(nonzero_bitwise)]
ACP: rust-lang/libs-team#413

This is a tracking issue for bitwise and bytewise methods on NonZero. When used on a non-zero integer, these methods result in a non-zero integer, so can take the form fn(self) -> Self.

Public API

// core::num

impl<T> NonZero<T> {
    pub fn reverse_bits(self)  -> Self;
    pub fn rotate_left(self) -> Self;
    pub fn rotate_right(self) -> Self;
    pub fn swap_bytes(self) -> Self;
    pub fn to_be(self) -> Self;
    pub fn to_le(self) -> Self;
    pub fn from_be(x: Self) -> Self;
    pub fn from_le(x: Self) -> Self;
}

Steps / History

Unresolved Questions

  • None yet.

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

@pitaj pitaj added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. labels Jul 27, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jul 28, 2024
…bilee

bitwise and bytewise methods on `NonZero`

Implementation for `nonzero_bitwise`
Tracking issue rust-lang#128281
ACP rust-lang/libs-team#413
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jul 28, 2024
…bilee

bitwise and bytewise methods on `NonZero`

Implementation for `nonzero_bitwise`
Tracking issue rust-lang#128281
ACP rust-lang/libs-team#413
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jul 28, 2024
Rollup merge of rust-lang#128282 - pitaj:nonzero_bitwise, r=workingjubilee

bitwise and bytewise methods on `NonZero`

Implementation for `nonzero_bitwise`
Tracking issue rust-lang#128281
ACP rust-lang/libs-team#413
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

1 participant