Closed
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.