From 7921401d1ae9801e4f5766e7d0aef2a53f14da3f Mon Sep 17 00:00:00 2001 From: Slanterns Date: Wed, 14 Aug 2024 18:35:58 +0800 Subject: [PATCH] stabilize `option_get_or_insert_default` --- core/src/option.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/src/option.rs b/core/src/option.rs index 6c89c81018038..69f0d716cc7b6 100644 --- a/core/src/option.rs +++ b/core/src/option.rs @@ -1650,8 +1650,6 @@ impl Option { /// # Examples /// /// ``` - /// #![feature(option_get_or_insert_default)] - /// /// let mut x = None; /// /// { @@ -1664,7 +1662,7 @@ impl Option { /// assert_eq!(x, Some(7)); /// ``` #[inline] - #[unstable(feature = "option_get_or_insert_default", issue = "82901")] + #[stable(feature = "option_get_or_insert_default", since = "CURRENT_RUSTC_VERSION")] pub fn get_or_insert_default(&mut self) -> &mut T where T: Default,