Skip to content

Commit 9151043

Browse files
authored
Unrolled build for #144871
Rollup merge of #144871 - Kivooeo:btree_entry_insert-stabilize, r=jhpratt Stabilize `btree_entry_insert` feature This stabilises `btree_map::VacantEntry::insert_entry` and `btree_map::Entry::insert_entry`, following the FCP in [tracking issue](#65225). New stable API: ```rust impl<'a, K: Ord, V, A: Allocator + Clone> Entry<'a, K, V, A> { pub fn insert_entry(self, value: V) -> OccupiedEntry<'a, K, V, A>; } impl<'a, K: Ord, V, A: Allocator + Clone> VacantEntry<'a, K, V, A> { pub fn insert_entry(mut self, value: V) -> OccupiedEntry<'a, K, V, A>; } ``` (FCP ended almost a year ago, so if it's needed for process we could rerun it) Closes: #65225
2 parents ba4b643 + b5a4e5d commit 9151043

File tree

1 file changed

+2
-4
lines changed
  • library/alloc/src/collections/btree/map

1 file changed

+2
-4
lines changed

library/alloc/src/collections/btree/map/entry.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,6 @@ impl<'a, K: Ord, V, A: Allocator + Clone> Entry<'a, K, V, A> {
271271
/// # Examples
272272
///
273273
/// ```
274-
/// #![feature(btree_entry_insert)]
275274
/// use std::collections::BTreeMap;
276275
///
277276
/// let mut map: BTreeMap<&str, String> = BTreeMap::new();
@@ -280,7 +279,7 @@ impl<'a, K: Ord, V, A: Allocator + Clone> Entry<'a, K, V, A> {
280279
/// assert_eq!(entry.key(), &"poneyland");
281280
/// ```
282281
#[inline]
283-
#[unstable(feature = "btree_entry_insert", issue = "65225")]
282+
#[stable(feature = "btree_entry_insert", since = "CURRENT_RUSTC_VERSION")]
284283
pub fn insert_entry(self, value: V) -> OccupiedEntry<'a, K, V, A> {
285284
match self {
286285
Occupied(mut entry) => {
@@ -379,7 +378,6 @@ impl<'a, K: Ord, V, A: Allocator + Clone> VacantEntry<'a, K, V, A> {
379378
/// # Examples
380379
///
381380
/// ```
382-
/// #![feature(btree_entry_insert)]
383381
/// use std::collections::BTreeMap;
384382
/// use std::collections::btree_map::Entry;
385383
///
@@ -391,7 +389,7 @@ impl<'a, K: Ord, V, A: Allocator + Clone> VacantEntry<'a, K, V, A> {
391389
/// }
392390
/// assert_eq!(map["poneyland"], 37);
393391
/// ```
394-
#[unstable(feature = "btree_entry_insert", issue = "65225")]
392+
#[stable(feature = "btree_entry_insert", since = "CURRENT_RUSTC_VERSION")]
395393
pub fn insert_entry(mut self, value: V) -> OccupiedEntry<'a, K, V, A> {
396394
let handle = match self.handle {
397395
None => {

0 commit comments

Comments
 (0)