Skip to content

Tracking Issue for BITS constant for non-zero integers #94881

Closed
@nvzqz

Description

@nvzqz

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

Unresolved Questions

  • None yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions