We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2789b06 commit d04362fCopy full SHA for d04362f
src/libcore/option.rs
@@ -829,14 +829,13 @@ impl<'a, T: Clone> Option<&'a mut T> {
829
/// # Examples
830
///
831
/// ```
832
- /// #![feature(option_ref_mut_cloned)]
833
/// let mut x = 12;
834
/// let opt_x = Some(&mut x);
835
/// assert_eq!(opt_x, Some(&mut 12));
836
/// let cloned = opt_x.cloned();
837
/// assert_eq!(cloned, Some(12));
838
839
- #[unstable(feature = "option_ref_mut_cloned", issue = "43738")]
+ #[stable(since = "1.26.0", feature = "option_ref_mut_cloned")]
840
pub fn cloned(self) -> Option<T> {
841
self.map(|t| t.clone())
842
}
0 commit comments