-
Notifications
You must be signed in to change notification settings - Fork 14k
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: 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.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This 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.The final comment period is finished for this PR / Issue.
Description
Feature gate: #![feature(const_str_from_utf8)]
This is a tracking issue for str::{from_utf8, from_utf8_mut} and str::Utf8Error::{valid_up_to, error_len} as const fn
Public API
// core::str
pub const fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error>;
impl str {
pub const fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error>;
}Public API (stabilized in Rust 1.63)
// core::str
pub const fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error>;
impl Utf8Error {
pub const fn valid_up_to(&self) -> usize;
pub const fn error_len(&self) -> Option<usize>;
}Steps / History
- Implementation: Make slice->str conversion and related functions
const#90607 - Final comment period (FCP) (
&functions) - Stabilization PR (
&functions) - Final comment period (FCP) (
&mutfunction) - Stabilization PR (
&mutfunction)
Unresolved Questions
- None yet.
joseluis
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: 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.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This 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.The final comment period is finished for this PR / Issue.