Skip to content

Commit be39572

Browse files
authored
Rollup merge of #146820 - cammeresi:alloc-20250919, r=tgross35
Add unstable attribute to BTreeMap-related allocator generics Although these types aren't directly constructable externally, since they're pub, I think this omission was an oversight. r? libs-api
2 parents 92ea947 + 42b38e3 commit be39572

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,11 @@ impl<K, V: fmt::Debug> fmt::Debug for ValuesMut<'_, K, V> {
546546
/// [`into_keys`]: BTreeMap::into_keys
547547
#[must_use = "iterators are lazy and do nothing unless consumed"]
548548
#[stable(feature = "map_into_keys_values", since = "1.54.0")]
549-
pub struct IntoKeys<K, V, A: Allocator + Clone = Global> {
549+
pub struct IntoKeys<
550+
K,
551+
V,
552+
#[unstable(feature = "allocator_api", issue = "32838")] A: Allocator + Clone = Global,
553+
> {
550554
inner: IntoIter<K, V, A>,
551555
}
552556

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,12 @@ impl<K: Debug + Ord, V: Debug, A: Allocator + Clone> Debug for OccupiedEntry<'_,
9999
///
100100
/// Contains the occupied entry, and the value that was not inserted.
101101
#[unstable(feature = "map_try_insert", issue = "82766")]
102-
pub struct OccupiedError<'a, K: 'a, V: 'a, A: Allocator + Clone = Global> {
102+
pub struct OccupiedError<
103+
'a,
104+
K: 'a,
105+
V: 'a,
106+
#[unstable(feature = "allocator_api", issue = "32838")] A: Allocator + Clone = Global,
107+
> {
103108
/// The entry in the map that was already occupied.
104109
pub entry: OccupiedEntry<'a, K, V, A>,
105110
/// The value which was not inserted, because the entry was already occupied.

0 commit comments

Comments
 (0)