Closed
Description
Feature gates: #![feature(option_owned)]
, #![feature(result_owned)]
This is a tracking issue for owned
method on Option
and Result
.
Public API
// alloc::option
impl<T: ?Sized> Option<&T> {
pub fn owned(self) -> Option<T::Owned>
where
T: ToOwned;
}
impl<T: ?Sized> Option<&mut T> {
pub fn owned(self) -> Option<T::Owned>
where
T: ToOwned;
}
// alloc::result
impl<T: ?Sized, E> Result<&T, E> {
pub fn owned(self) -> Result<T::Owned, E>
where
T: ToOwned;
}
impl<T: ?Sized, E> Result<&mut T, E> {
pub fn owned(self) -> Result<T::Owned, E>
where
T: ToOwned;
}
Steps / History
- Implementation: Add
Option::owned
#98061 - Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- None yet.