Skip to content

Commit 7921401

Browse files
committed
stabilize option_get_or_insert_default
1 parent 3b8aab7 commit 7921401

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Diff for: core/src/option.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1650,8 +1650,6 @@ impl<T> Option<T> {
16501650
/// # Examples
16511651
///
16521652
/// ```
1653-
/// #![feature(option_get_or_insert_default)]
1654-
///
16551653
/// let mut x = None;
16561654
///
16571655
/// {
@@ -1664,7 +1662,7 @@ impl<T> Option<T> {
16641662
/// assert_eq!(x, Some(7));
16651663
/// ```
16661664
#[inline]
1667-
#[unstable(feature = "option_get_or_insert_default", issue = "82901")]
1665+
#[stable(feature = "option_get_or_insert_default", since = "CURRENT_RUSTC_VERSION")]
16681666
pub fn get_or_insert_default(&mut self) -> &mut T
16691667
where
16701668
T: Default,

0 commit comments

Comments
 (0)