Skip to content

Commit ab0ad55

Browse files
author
Sven Bartscher
committed
Make BTreeMap::new_in const
Closes rust-lang/wg-allocators#118
1 parent 7a19a72 commit ab0ad55

File tree

1 file changed

+1
-1
lines changed
  • alloc/src/collections/btree

1 file changed

+1
-1
lines changed

alloc/src/collections/btree/map.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> {
669669
/// map.insert(1, "a");
670670
/// ```
671671
#[unstable(feature = "btreemap_alloc", issue = "32838")]
672-
pub fn new_in(alloc: A) -> BTreeMap<K, V, A> {
672+
pub const fn new_in(alloc: A) -> BTreeMap<K, V, A> {
673673
BTreeMap { root: None, length: 0, alloc: ManuallyDrop::new(alloc), _marker: PhantomData }
674674
}
675675
}

0 commit comments

Comments
 (0)