about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Bartscher <sven.bartscher@netapp.com>2023-10-09 11:08:48 +0200
committerSven Bartscher <sven.bartscher@netapp.com>2023-10-09 11:08:48 +0200
commitbbc230478c5a282a83592830dc338407ed9804eb (patch)
tree995324d921aed1dc0b0a814be0c2c21930caac21
parent093b9d5b295d85e144d0ee7da65ea03987214c06 (diff)
downloadrust-bbc230478c5a282a83592830dc338407ed9804eb.tar.gz
rust-bbc230478c5a282a83592830dc338407ed9804eb.zip
Make BTreeMap::new_in const
Closes rust-lang/wg-allocators#118
-rw-r--r--library/alloc/src/collections/btree/map.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/collections/btree/map.rs b/library/alloc/src/collections/btree/map.rs
index 5481b327d69..4bdd9639557 100644
--- a/library/alloc/src/collections/btree/map.rs
+++ b/library/alloc/src/collections/btree/map.rs
@@ -669,7 +669,7 @@ impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> {
     /// map.insert(1, "a");
     /// ```
     #[unstable(feature = "btreemap_alloc", issue = "32838")]
-    pub fn new_in(alloc: A) -> BTreeMap<K, V, A> {
+    pub const fn new_in(alloc: A) -> BTreeMap<K, V, A> {
         BTreeMap { root: None, length: 0, alloc: ManuallyDrop::new(alloc), _marker: PhantomData }
     }
 }