Skip to content

Commit

Permalink
Rollup merge of #92483 - ksqsf:master, r=dtolnay
Browse files Browse the repository at this point in the history
Stabilize `result_cloned` and `result_copied`

Tracking issue: #63168

The FCP is now completed.
  • Loading branch information
matthiaskrgr authored Jan 5, 2022
2 parents bf9546c + 1c547f4 commit 051d591
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions library/core/src/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1504,14 +1504,14 @@ impl<T, E> Result<&T, E> {
/// # Examples
///
/// ```
/// #![feature(result_copied)]
/// let val = 12;
/// let x: Result<&i32, i32> = Ok(&val);
/// assert_eq!(x, Ok(&12));
/// let copied = x.copied();
/// assert_eq!(copied, Ok(12));
/// ```
#[unstable(feature = "result_copied", reason = "newly added", issue = "63168")]
#[inline]
#[stable(feature = "result_copied", since = "1.59.0")]
pub fn copied(self) -> Result<T, E>
where
T: Copy,
Expand All @@ -1525,14 +1525,14 @@ impl<T, E> Result<&T, E> {
/// # Examples
///
/// ```
/// #![feature(result_cloned)]
/// let val = 12;
/// let x: Result<&i32, i32> = Ok(&val);
/// assert_eq!(x, Ok(&12));
/// let cloned = x.cloned();
/// assert_eq!(cloned, Ok(12));
/// ```
#[unstable(feature = "result_cloned", reason = "newly added", issue = "63168")]
#[inline]
#[stable(feature = "result_cloned", since = "1.59.0")]
pub fn cloned(self) -> Result<T, E>
where
T: Clone,
Expand All @@ -1548,14 +1548,14 @@ impl<T, E> Result<&mut T, E> {
/// # Examples
///
/// ```
/// #![feature(result_copied)]
/// let mut val = 12;
/// let x: Result<&mut i32, i32> = Ok(&mut val);
/// assert_eq!(x, Ok(&mut 12));
/// let copied = x.copied();
/// assert_eq!(copied, Ok(12));
/// ```
#[unstable(feature = "result_copied", reason = "newly added", issue = "63168")]
#[inline]
#[stable(feature = "result_copied", since = "1.59.0")]
pub fn copied(self) -> Result<T, E>
where
T: Copy,
Expand All @@ -1569,14 +1569,14 @@ impl<T, E> Result<&mut T, E> {
/// # Examples
///
/// ```
/// #![feature(result_cloned)]
/// let mut val = 12;
/// let x: Result<&mut i32, i32> = Ok(&mut val);
/// assert_eq!(x, Ok(&mut 12));
/// let cloned = x.cloned();
/// assert_eq!(cloned, Ok(12));
/// ```
#[unstable(feature = "result_cloned", reason = "newly added", issue = "63168")]
#[inline]
#[stable(feature = "result_cloned", since = "1.59.0")]
pub fn cloned(self) -> Result<T, E>
where
T: Clone,
Expand Down

0 comments on commit 051d591

Please sign in to comment.