Open
Description
Feature gate: #![feature(mem_reshape)]
This is a tracking issue for core::mem::reshape
.
core::mem::reshape
allows modifying a mutable reference with its moved underlying value.
Public API
// core::mem
let mut x = "some_string".to_string();
reshape(&mut x, |x| x + " that is reshaped");
println!("{x}");
Steps / History
- Implementation: added core::mem::reshape #130849
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- None yet.