diff options
| author | Sidney Cammeresi <sac@cheesecake.org> | 2025-09-19 21:17:21 -0700 |
|---|---|---|
| committer | Sidney Cammeresi <sac@cheesecake.org> | 2025-09-19 21:32:15 -0700 |
| commit | 42b38e3781ee3c34cf3df4dea4cd836a814cfb60 (patch) | |
| tree | af7e2a463d3d642e70a4777e81b3a0f8544d5367 /library/alloc/src | |
| parent | ec38671075266e9cee0348701da2e133379e7c6c (diff) | |
| download | rust-42b38e3781ee3c34cf3df4dea4cd836a814cfb60.tar.gz rust-42b38e3781ee3c34cf3df4dea4cd836a814cfb60.zip | |
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.
Diffstat (limited to 'library/alloc/src')
| -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. |
