Closed
Description
Feature gate: #![feature(nonzero_bits)]
This is a tracking issue for adding the associated BITS
constant to NonZero{U,I}{8,16,32,64,128,size}
.
This is useful when a type alias refers to either a regular or non-zero integer.
Public API
Repeated for all NonZeroX
integers:
impl NonZeroUsize {
pub const BITS: u32 = usize::BITS;
}
Steps / History
- Implementation: Implement
BITS
constant for non-zero integers #93292 - Final comment period (FCP)
- Stabilization PR: Stabilize
nonzero_bits
#101514
Unresolved Questions
- None yet.