diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-09-21 14:42:36 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-21 14:42:36 +1000 |
| commit | be395723b59aab93fbb510fb20656272d5fa27b7 (patch) | |
| tree | ae967e7c7e296c42b5bd89822afa3658523b1cfb /library | |
| parent | 92ea947c782cbfb1f2e75e2c4b53ebe4158a7f33 (diff) | |
| parent | 42b38e3781ee3c34cf3df4dea4cd836a814cfb60 (diff) | |
| download | rust-be395723b59aab93fbb510fb20656272d5fa27b7.tar.gz rust-be395723b59aab93fbb510fb20656272d5fa27b7.zip | |
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
Diffstat (limited to 'library')
| -rw-r--r-- | library/alloc/src/collections/btree/map.rs | 6 | ||||
| -rw-r--r-- | library/alloc/src/collections/btree/map/entry.rs | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/library/alloc/src/collections/btree/map.rs b/library/alloc/src/collections/btree/map.rs index 98f11e2ea57..cebd25c6039 100644 --- a/library/alloc/src/collections/btree/map.rs +++ b/library/alloc/src/collections/btree/map.rs @@ -546,7 +546,11 @@ impl<K, V: fmt::Debug> fmt::Debug for ValuesMut<'_, K, V> { /// [`into_keys`]: BTreeMap::into_keys #[must_use = "iterators are lazy and do nothing unless consumed"] #[stable(feature = "map_into_keys_values", since = "1.54.0")] -pub struct IntoKeys<K, V, A: Allocator + Clone = Global> { +pub struct IntoKeys< + K, + V, + #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator + Clone = Global, +> { inner: IntoIter<K, V, A>, } diff --git a/library/alloc/src/collections/btree/map/entry.rs b/library/alloc/src/collections/btree/map/entry.rs index 21486651b0b..df51be3de54 100644 --- a/library/alloc/src/collections/btree/map/entry.rs +++ b/library/alloc/src/collections/btree/map/entry.rs @@ -99,7 +99,12 @@ impl<K: Debug + Ord, V: Debug, A: Allocator + Clone> Debug for OccupiedEntry<'_, /// /// Contains the occupied entry, and the value that was not inserted. #[unstable(feature = "map_try_insert", issue = "82766")] -pub struct OccupiedError<'a, K: 'a, V: 'a, A: Allocator + Clone = Global> { +pub struct OccupiedError< + 'a, + K: 'a, + V: 'a, + #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator + Clone = Global, +> { /// The entry in the map that was already occupied. pub entry: OccupiedEntry<'a, K, V, A>, /// The value which was not inserted, because the entry was already occupied. |
