Skip to content

Commit 900037e

Browse files
committed
Auto merge of #51079 - GuillaumeGomez:stabilize-entry-or-default, r=SimonSapin
Stabilize entry-or-default Fixes #44324. cc @SimonSapin
2 parents 684b8d3 + 861c7cb commit 900037e

File tree

4 files changed

+2
-19
lines changed

4 files changed

+2
-19
lines changed

src/doc/unstable-book/src/library-features/entry-or-default.md

-13
This file was deleted.

src/liballoc/btree/map.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2184,14 +2184,13 @@ impl<'a, K: Ord, V> Entry<'a, K, V> {
21842184
}
21852185

21862186
impl<'a, K: Ord, V: Default> Entry<'a, K, V> {
2187-
#[unstable(feature = "entry_or_default", issue = "44324")]
2187+
#[stable(feature = "entry_or_default", since = "1.28.0")]
21882188
/// Ensures a value is in the entry by inserting the default value if empty,
21892189
/// and returns a mutable reference to the value in the entry.
21902190
///
21912191
/// # Examples
21922192
///
21932193
/// ```
2194-
/// #![feature(entry_or_default)]
21952194
/// # fn main() {
21962195
/// use std::collections::BTreeMap;
21972196
///

src/librustc/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
#![feature(const_fn)]
4646
#![feature(core_intrinsics)]
4747
#![feature(drain_filter)]
48-
#![feature(entry_or_default)]
4948
#![feature(from_ref)]
5049
#![feature(fs_read_write)]
5150
#![feature(iterator_find_map)]

src/libstd/collections/hash/map.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -2161,14 +2161,13 @@ impl<'a, K, V> Entry<'a, K, V> {
21612161
}
21622162

21632163
impl<'a, K, V: Default> Entry<'a, K, V> {
2164-
#[unstable(feature = "entry_or_default", issue = "44324")]
2164+
#[stable(feature = "entry_or_default", since = "1.28.0")]
21652165
/// Ensures a value is in the entry by inserting the default value if empty,
21662166
/// and returns a mutable reference to the value in the entry.
21672167
///
21682168
/// # Examples
21692169
///
21702170
/// ```
2171-
/// #![feature(entry_or_default)]
21722171
/// # fn main() {
21732172
/// use std::collections::HashMap;
21742173
///
@@ -2184,7 +2183,6 @@ impl<'a, K, V: Default> Entry<'a, K, V> {
21842183
Vacant(entry) => entry.insert(Default::default()),
21852184
}
21862185
}
2187-
21882186
}
21892187

21902188
impl<'a, K, V> OccupiedEntry<'a, K, V> {

0 commit comments

Comments
 (0)