-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
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.
Description
Feature gate: #![feature(const_cstr_methods)]
This is a tracking issue for CStr
methods as const
functions.
Public API
// core::ffi
impl CStr {
// feature(const_cstr_methods)
pub const fn from_bytes_with_nul(bytes: &[u8]) -> Result<&Self, FromBytesWithNulError>;
pub const fn to_bytes(&self) -> &[u8];
pub const fn to_bytes_with_nul(&self) -> &[u8];
pub const fn to_str(&self) -> Result<&str, str::Utf8Error>;
}
// Note that those methods are stable, they are only unstable as `const` fn
Steps / History
- Implementation: constify some
CStr
methods #100291 - Final comment period (FCP)1
- Stabilization PR Stabilize
const_cstr_methods
#107624
Unresolved Questions
- None yet.
Footnotes
MaxVerevkin, dfreese, chrysn and JarvisCraftchrysn, akashgurava and JarvisCraft
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.