Skip to content

Tracking Issue for const [u8]::is_ascii (const_slice_is_ascii) #111090

Description

@scottmcm

Feature gate: #![feature(const_slice_is_ascii)]

This is a tracking issue for [u8]::is_ascii being a const fn.

UTF-8 checking in const fn stabilized back in 1.63 (#97367), but apparently somehow simpler ASCII checking was never const-ified.

Public API

// core::slice

impl [u8] {
    const fn is_ascii(&self) -> bool;
}

// core::str

impl str {
    const fn is_ascii(&self) -> bool;
}

Steps / History

Unresolved Questions

  • None yet.

Footnotes

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

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-UnicodeArea: UnicodeC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-api[DEPRECATED; DO NOT USE]disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions