Open
Description
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
- Implementation: bitwise and bytewise methods on
NonZero
#128282 - Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- None yet.
Activity