From cc38c1e9cb75d12f41cfda3317867759ab895b20 Mon Sep 17 00:00:00 2001 From: Urgau Date: Wed, 6 Mar 2024 19:14:03 +0100 Subject: [PATCH] Add #[inline] to BTreeMap::new constructor --- library/alloc/src/collections/btree/map.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/alloc/src/collections/btree/map.rs b/library/alloc/src/collections/btree/map.rs index 58ffa9710d3e6..e99c6220e2064 100644 --- a/library/alloc/src/collections/btree/map.rs +++ b/library/alloc/src/collections/btree/map.rs @@ -624,6 +624,7 @@ impl BTreeMap { /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_stable(feature = "const_btree_new", since = "1.66.0")] + #[inline] #[must_use] pub const fn new() -> BTreeMap { BTreeMap { root: None, length: 0, alloc: ManuallyDrop::new(Global), _marker: PhantomData }