Skip to content

Tracking Issue for nonzero_from_str_radix #152193

@sorairolake

Description

@sorairolake

Feature gate: #![feature(nonzero_from_str_radix)]

This is a tracking issue for the from_str_radix of NonZero<T> where T is one of the primitive integer types.

This method is identical to the from_str_radix method of the primitive integer types, except that it can return IntErrorKind::Zero as an error if the string represents 0. This method is similar to the NonZero::<T>::from_str method, except that it can parse both decimal integers and non-decimal integers.

Public API

// core::num

// Where `T` is one of the primitive integer types.
impl NonZero<T> {
    pub const fn from_str_radix(src: &str, radix: u32) -> Result<Self, ParseIntError>;
}

Steps / History

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

Unresolved Questions

  • None yet.

Footnotes

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

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