From d60b43c06aad0b181b72ba5ed389961436ac1609 Mon Sep 17 00:00:00 2001 From: Sven Bartscher Date: Mon, 9 Oct 2023 11:17:56 +0200 Subject: [PATCH] Make BTreeSet::new_in const --- library/alloc/src/collections/btree/set.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/alloc/src/collections/btree/set.rs b/library/alloc/src/collections/btree/set.rs index 9da230915b822..0e03551286e8a 100644 --- a/library/alloc/src/collections/btree/set.rs +++ b/library/alloc/src/collections/btree/set.rs @@ -358,7 +358,7 @@ impl BTreeSet { /// let mut set: BTreeSet = BTreeSet::new_in(Global); /// ``` #[unstable(feature = "btreemap_alloc", issue = "32838")] - pub fn new_in(alloc: A) -> BTreeSet { + pub const fn new_in(alloc: A) -> BTreeSet { BTreeSet { map: BTreeMap::new_in(alloc) } }