diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-01-05 15:05:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-05 15:05:47 +0100 |
| commit | 051d591edff3f771d6aa7fb6c386fdc4177fc5cd (patch) | |
| tree | 4d09e23ec3c992e2c52b9abb49b7bfd161599118 | |
| parent | bf9546c127df1a7a6b641a5cd6d741a32b6fddad (diff) | |
| parent | 1c547f422a50ed1af53ab73f4cbcc58ba8c7a06b (diff) | |
| download | rust-051d591edff3f771d6aa7fb6c386fdc4177fc5cd.tar.gz rust-051d591edff3f771d6aa7fb6c386fdc4177fc5cd.zip | |
Rollup merge of #92483 - ksqsf:master, r=dtolnay
Stabilize `result_cloned` and `result_copied` Tracking issue: #63168 The FCP is now completed.
| -rw-r--r-- | library/core/src/result.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/library/core/src/result.rs b/library/core/src/result.rs index 504a01813ac..575fd2b42d2 100644 --- a/library/core/src/result.rs +++ b/library/core/src/result.rs @@ -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, @@ -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, @@ -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, @@ -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, |
