diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2018-03-06 20:01:13 -0600 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2018-03-07 07:09:53 -0800 |
| commit | 05ebc19de3cf1a35399097875bbd7f676a4678be (patch) | |
| tree | 2805ca1777b672d007eb277902d4a3c70971708e /src | |
| parent | 0e6df533d47baad149f4c0d49c2c60cb79d7a2d7 (diff) | |
| parent | d04362f23d5899af5aa01562c27fc6ddb53a4d7e (diff) | |
| download | rust-05ebc19de3cf1a35399097875bbd7f676a4678be.tar.gz rust-05ebc19de3cf1a35399097875bbd7f676a4678be.zip | |
Rollup merge of #48787 - mbrubeck:cloned, r=joshtriplett
Stabilize option_ref_mut_cloned Closes #43738.
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcore/option.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 25f57d8c0f7..570f745f833 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -829,14 +829,13 @@ impl<'a, T: Clone> Option<&'a mut T> { /// # Examples /// /// ``` - /// #![feature(option_ref_mut_cloned)] /// let mut x = 12; /// let opt_x = Some(&mut x); /// assert_eq!(opt_x, Some(&mut 12)); /// let cloned = opt_x.cloned(); /// assert_eq!(cloned, Some(12)); /// ``` - #[unstable(feature = "option_ref_mut_cloned", issue = "43738")] + #[stable(since = "1.26.0", feature = "option_ref_mut_cloned")] pub fn cloned(self) -> Option<T> { self.map(|t| t.clone()) } |
