about summary refs log tree commit diff
diff options
context:
space:
mode:
authorksqsf <i@ksqsf.moe>2021-12-19 16:59:39 +0800
committerksqsf <i@ksqsf.moe>2022-01-04 13:23:32 +0800
commit1c547f422a50ed1af53ab73f4cbcc58ba8c7a06b (patch)
tree70de98bb7777616f2c0bd9100c6bbb122058980a
parent2b681ac06b1a6b7ea39525e59363ffee0d1a68e5 (diff)
downloadrust-1c547f422a50ed1af53ab73f4cbcc58ba8c7a06b.tar.gz
rust-1c547f422a50ed1af53ab73f4cbcc58ba8c7a06b.zip
Stabilize `result_cloned` and `result_copied`
-rw-r--r--library/core/src/result.rs16
1 files 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<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,
@@ -1521,14 +1521,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,
@@ -1544,14 +1544,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,
@@ -1565,14 +1565,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,