diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2021-04-11 11:54:13 +0200 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2021-04-11 12:22:08 +0200 |
| commit | a9310601071a056cbcbf92d6d5c4ad8a45ba0fc0 (patch) | |
| tree | 42d1316550b2cd455ddae6ddb295c8ab30394c23 | |
| parent | 28b948fc5c0163b76c69d792b91a0e83850e7e54 (diff) | |
| download | rust-a9310601071a056cbcbf92d6d5c4ad8a45ba0fc0.tar.gz rust-a9310601071a056cbcbf92d6d5c4ad8a45ba0fc0.zip | |
Stabilize option_insert.
| -rw-r--r-- | library/core/src/option.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/library/core/src/option.rs b/library/core/src/option.rs index da2c0cf476d..1e1e9613696 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -601,8 +601,6 @@ impl<T> Option<T> { /// # Example /// /// ``` - /// #![feature(option_insert)] - /// /// let mut opt = None; /// let val = opt.insert(1); /// assert_eq!(*val, 1); @@ -613,7 +611,7 @@ impl<T> Option<T> { /// assert_eq!(opt.unwrap(), 3); /// ``` #[inline] - #[unstable(feature = "option_insert", reason = "newly added", issue = "78271")] + #[stable(feature = "option_insert", since = "1.53.0")] pub fn insert(&mut self, value: T) -> &mut T { *self = Some(value); |
