Open
Description
Feature gate: #![feature(box_into_inner)]
This is a tracking issue for consuming a Box
and returning its wrapped value.
The language actually supports *x
as a special case. However it can't be generalized to other types easily. It also doesn't consume the Box
value immediately if T
is Copy
, which is quite a footgun.
An explicit version is added here to make the API more consistent with Pin
, Cell
, RefCell
etc.
Public API
impl<T, A: Allocator> Box<T, A> {
pub fn into_inner(boxed: Self) -> T;
}
Steps / History
- Implementation: Add
Box::into_inner
. #80438 - Improve documentation for
Box::into_inner
#98523 - Final commenting period (FCP)
- Stabilization PR
Unresolved Questions
- None yet.
Metadata
Metadata
Assignees
Labels
Area: Our favorite opsem complicationCategory: An issue tracking the progress of sth. like the implementation of an RFCLibs issues that are tracked on the team's project board.Relevant to the library API team, which will review and decide on the PR/issue.This issue / PR is in PFCP or FCP with a disposition to merge it.Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.