Tracking Issue for uint_bit_width (original) (raw)

Feature gate: #![feature(uint_bit_width)]

This is a tracking issue for the bit_width method that return the minimum number of bits required to represent an unsigned integer.

This method is implemented for the primitive unsigned integer types and unsigned NonZero<T>.

Public API

impl {u8,u16,u32,u64,u128,usize} { pub const fn bit_width(self) -> u32; }

// For all unsigned T. impl NonZero { pub const fn bit_width(self) -> NonZero; }

Steps / History

(Remember to update the S-tracking-* label when checking boxes.)

Unresolved Questions

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