From 1c547f422a50ed1af53ab73f4cbcc58ba8c7a06b Mon Sep 17 00:00:00 2001 From: ksqsf Date: Sun, 19 Dec 2021 16:59:39 +0800 Subject: [PATCH] Stabilize `result_cloned` and `result_copied` --- library/core/src/result.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/library/core/src/result.rs b/library/core/src/result.rs index f46632e7a8d..42d5a20e666 100644 --- a/library/core/src/result.rs +++ b/library/core/src/result.rs @@ -1500,14 +1500,14 @@ impl 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 where T: Copy, @@ -1521,14 +1521,14 @@ impl 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 where T: Clone, @@ -1544,14 +1544,14 @@ impl 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 where T: Copy, @@ -1565,14 +1565,14 @@ impl 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 where T: Clone,