-
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(string_leak)]
This is a tracking issue for String::leak
impl String {
pub fn leak<'a>(self) -> &'a mut str {
let me = self.into_bytes().leak();
// Safety: Bytes from a [`String`] are valid utf8.
unsafe { std::str::from_utf8_unchecked_mut(me) }
}
}
Steps / History
- ACP (Add
String::leak
libs-team#109) - Implementation: (#102929) Implement
String::leak
(attempt 2) #103280 - Final comment period (FCP)1
- Stabilization PR (Stabilize String::leak #109814 (comment))
Unresolved Questions
- None yet.
Footnotes
ModProg
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.