From eddd4f05012ed9ebefa6e2e5ca91da4116d30996 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Thu, 4 Mar 2021 16:54:28 +0100 Subject: [PATCH] Add tracking issue for map_try_insert. --- library/alloc/src/collections/btree/map.rs | 2 +- library/alloc/src/collections/btree/map/entry.rs | 6 +++--- library/std/src/collections/hash/map.rs | 8 ++++---- library/std/src/error.rs | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/library/alloc/src/collections/btree/map.rs b/library/alloc/src/collections/btree/map.rs index 12a7322d8e7..622983996aa 100644 --- a/library/alloc/src/collections/btree/map.rs +++ b/library/alloc/src/collections/btree/map.rs @@ -859,7 +859,7 @@ impl BTreeMap { /// assert_eq!(err.entry.get(), &"a"); /// assert_eq!(err.value, "b"); /// ``` - #[unstable(feature = "map_try_insert", issue = "none")] + #[unstable(feature = "map_try_insert", issue = "82766")] pub fn try_insert(&mut self, key: K, value: V) -> Result<&mut V, OccupiedError<'_, K, V>> where K: Ord, diff --git a/library/alloc/src/collections/btree/map/entry.rs b/library/alloc/src/collections/btree/map/entry.rs index a5ece31d67b..6b30d959773 100644 --- a/library/alloc/src/collections/btree/map/entry.rs +++ b/library/alloc/src/collections/btree/map/entry.rs @@ -74,7 +74,7 @@ impl Debug for OccupiedEntry<'_, K, V> { /// The error returned by [`try_insert`](BTreeMap::try_insert) when the key already exists. /// /// Contains the occupied entry, and the value that was not inserted. -#[unstable(feature = "map_try_insert", issue = "none")] +#[unstable(feature = "map_try_insert", issue = "82766")] pub struct OccupiedError<'a, K: 'a, V: 'a> { /// The entry in the map that was already occupied. pub entry: OccupiedEntry<'a, K, V>, @@ -82,7 +82,7 @@ pub struct OccupiedError<'a, K: 'a, V: 'a> { pub value: V, } -#[unstable(feature = "map_try_insert", issue = "none")] +#[unstable(feature = "map_try_insert", issue = "82766")] impl Debug for OccupiedError<'_, K, V> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("OccupiedError") @@ -93,7 +93,7 @@ impl Debug for OccupiedError<'_, K, V> { } } -#[unstable(feature = "map_try_insert", issue = "none")] +#[unstable(feature = "map_try_insert", issue = "82766")] impl<'a, K: Debug + Ord, V: Debug> fmt::Display for OccupiedError<'a, K, V> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!( diff --git a/library/std/src/collections/hash/map.rs b/library/std/src/collections/hash/map.rs index cd6787cf588..233afa92389 100644 --- a/library/std/src/collections/hash/map.rs +++ b/library/std/src/collections/hash/map.rs @@ -867,7 +867,7 @@ where /// assert_eq!(err.entry.get(), &"a"); /// assert_eq!(err.value, "b"); /// ``` - #[unstable(feature = "map_try_insert", issue = "none")] + #[unstable(feature = "map_try_insert", issue = "82766")] pub fn try_insert(&mut self, key: K, value: V) -> Result<&mut V, OccupiedError<'_, K, V>> { match self.entry(key) { Occupied(entry) => Err(OccupiedError { entry, value }), @@ -1887,7 +1887,7 @@ impl Debug for VacantEntry<'_, K, V> { /// The error returned by [`try_insert`](HashMap::try_insert) when the key already exists. /// /// Contains the occupied entry, and the value that was not inserted. -#[unstable(feature = "map_try_insert", issue = "none")] +#[unstable(feature = "map_try_insert", issue = "82766")] pub struct OccupiedError<'a, K: 'a, V: 'a> { /// The entry in the map that was already occupied. pub entry: OccupiedEntry<'a, K, V>, @@ -1895,7 +1895,7 @@ pub struct OccupiedError<'a, K: 'a, V: 'a> { pub value: V, } -#[unstable(feature = "map_try_insert", issue = "none")] +#[unstable(feature = "map_try_insert", issue = "82766")] impl Debug for OccupiedError<'_, K, V> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("OccupiedError") @@ -1906,7 +1906,7 @@ impl Debug for OccupiedError<'_, K, V> { } } -#[unstable(feature = "map_try_insert", issue = "none")] +#[unstable(feature = "map_try_insert", issue = "82766")] impl<'a, K: Debug, V: Debug> fmt::Display for OccupiedError<'a, K, V> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!( diff --git a/library/std/src/error.rs b/library/std/src/error.rs index a7f744ce515..80c35307d52 100644 --- a/library/std/src/error.rs +++ b/library/std/src/error.rs @@ -470,7 +470,7 @@ impl Error for char::DecodeUtf16Error { } } -#[unstable(feature = "map_try_insert", issue = "none")] +#[unstable(feature = "map_try_insert", issue = "82766")] impl<'a, K: Debug + Ord, V: Debug> Error for crate::collections::btree_map::OccupiedError<'a, K, V> { @@ -480,7 +480,7 @@ impl<'a, K: Debug + Ord, V: Debug> Error } } -#[unstable(feature = "map_try_insert", issue = "none")] +#[unstable(feature = "map_try_insert", issue = "82766")] impl<'a, K: Debug, V: Debug> Error for crate::collections::hash_map::OccupiedError<'a, K, V> { #[allow(deprecated)] fn description(&self) -> &str {