diff options
| author | bors <bors@rust-lang.org> | 2021-05-06 15:19:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-05-06 15:19:39 +0000 |
| commit | d44f647ffcff0e1ff2c0f45b6a0ce9796d80f1ca (patch) | |
| tree | 11e72654b4a65b93a5c4249357b092a0c4293f26 /library/alloc/src | |
| parent | 109248a4eb99bc83684c94ca4ef36f2fadc17e2a (diff) | |
| parent | ccc820e1f8eb8d8d142bd93d578bb5c7d9bb6775 (diff) | |
| download | rust-d44f647ffcff0e1ff2c0f45b6a0ce9796d80f1ca.tar.gz rust-d44f647ffcff0e1ff2c0f45b6a0ce9796d80f1ca.zip | |
Auto merge of #84982 - Dylan-DPC:rollup-q4cbec2, r=Dylan-DPC
Rollup of 8 pull requests
Successful merges:
- #83507 (Implement RFC 2951: Native link modifiers)
- #84328 (Stablize {HashMap,BTreeMap}::into_{keys,values})
- #84712 (Simplify chdir implementation and minimize unsafe block)
- #84851 (:arrow_up: rust-analyzer)
- #84923 (Only compute Obligation `cache_key` once in `register_obligation_at`)
- #84945 (E0583: Include secondary path in error message)
- #84949 (Fix typo in `MaybeUninit::array_assume_init` safety comment)
- #84950 (Revert PR 83866)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/alloc/src')
| -rw-r--r-- | library/alloc/src/collections/btree/map.rs | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/library/alloc/src/collections/btree/map.rs b/library/alloc/src/collections/btree/map.rs index 971244718b4..0a46387c34e 100644 --- a/library/alloc/src/collections/btree/map.rs +++ b/library/alloc/src/collections/btree/map.rs @@ -398,12 +398,12 @@ impl<K, V: fmt::Debug> fmt::Debug for ValuesMut<'_, K, V> { /// See its documentation for more. /// /// [`into_keys`]: BTreeMap::into_keys -#[unstable(feature = "map_into_keys_values", issue = "75294")] +#[stable(feature = "map_into_keys_values", since = "1.54.0")] pub struct IntoKeys<K, V> { inner: IntoIter<K, V>, } -#[unstable(feature = "map_into_keys_values", issue = "75294")] +#[stable(feature = "map_into_keys_values", since = "1.54.0")] impl<K: fmt::Debug, V> fmt::Debug for IntoKeys<K, V> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_list().entries(self.inner.iter().map(|(key, _)| key)).finish() @@ -416,12 +416,12 @@ impl<K: fmt::Debug, V> fmt::Debug for IntoKeys<K, V> { /// See its documentation for more. /// /// [`into_values`]: BTreeMap::into_values -#[unstable(feature = "map_into_keys_values", issue = "75294")] +#[stable(feature = "map_into_keys_values", since = "1.54.0")] pub struct IntoValues<K, V> { inner: IntoIter<K, V>, } -#[unstable(feature = "map_into_keys_values", issue = "75294")] +#[stable(feature = "map_into_keys_values", since = "1.54.0")] impl<K, V: fmt::Debug> fmt::Debug for IntoValues<K, V> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_list().entries(self.inner.iter().map(|(_, val)| val)).finish() @@ -1242,7 +1242,6 @@ impl<K, V> BTreeMap<K, V> { /// # Examples /// /// ``` - /// #![feature(map_into_keys_values)] /// use std::collections::BTreeMap; /// /// let mut a = BTreeMap::new(); @@ -1253,7 +1252,7 @@ impl<K, V> BTreeMap<K, V> { /// assert_eq!(keys, [1, 2]); /// ``` #[inline] - #[unstable(feature = "map_into_keys_values", issue = "75294")] + #[stable(feature = "map_into_keys_values", since = "1.54.0")] pub fn into_keys(self) -> IntoKeys<K, V> { IntoKeys { inner: self.into_iter() } } @@ -1265,7 +1264,6 @@ impl<K, V> BTreeMap<K, V> { /// # Examples /// /// ``` - /// #![feature(map_into_keys_values)] /// use std::collections::BTreeMap; /// /// let mut a = BTreeMap::new(); @@ -1276,7 +1274,7 @@ impl<K, V> BTreeMap<K, V> { /// assert_eq!(values, ["hello", "goodbye"]); /// ``` #[inline] - #[unstable(feature = "map_into_keys_values", issue = "75294")] + #[stable(feature = "map_into_keys_values", since = "1.54.0")] pub fn into_values(self) -> IntoValues<K, V> { IntoValues { inner: self.into_iter() } } @@ -1776,7 +1774,7 @@ impl<'a, K, V> Range<'a, K, V> { } } -#[unstable(feature = "map_into_keys_values", issue = "75294")] +#[stable(feature = "map_into_keys_values", since = "1.54.0")] impl<K, V> Iterator for IntoKeys<K, V> { type Item = K; @@ -1801,24 +1799,24 @@ impl<K, V> Iterator for IntoKeys<K, V> { } } -#[unstable(feature = "map_into_keys_values", issue = "75294")] +#[stable(feature = "map_into_keys_values", since = "1.54.0")] impl<K, V> DoubleEndedIterator for IntoKeys<K, V> { fn next_back(&mut self) -> Option<K> { self.inner.next_back().map(|(k, _)| k) } } -#[unstable(feature = "map_into_keys_values", issue = "75294")] +#[stable(feature = "map_into_keys_values", since = "1.54.0")] impl<K, V> ExactSizeIterator for IntoKeys<K, V> { fn len(&self) -> usize { self.inner.len() } } -#[unstable(feature = "map_into_keys_values", issue = "75294")] +#[stable(feature = "map_into_keys_values", since = "1.54.0")] impl<K, V> FusedIterator for IntoKeys<K, V> {} -#[unstable(feature = "map_into_keys_values", issue = "75294")] +#[stable(feature = "map_into_keys_values", since = "1.54.0")] impl<K, V> Iterator for IntoValues<K, V> { type Item = V; @@ -1835,21 +1833,21 @@ impl<K, V> Iterator for IntoValues<K, V> { } } -#[unstable(feature = "map_into_keys_values", issue = "75294")] +#[stable(feature = "map_into_keys_values", since = "1.54.0")] impl<K, V> DoubleEndedIterator for IntoValues<K, V> { fn next_back(&mut self) -> Option<V> { self.inner.next_back().map(|(_, v)| v) } } -#[unstable(feature = "map_into_keys_values", issue = "75294")] +#[stable(feature = "map_into_keys_values", since = "1.54.0")] impl<K, V> ExactSizeIterator for IntoValues<K, V> { fn len(&self) -> usize { self.inner.len() } } -#[unstable(feature = "map_into_keys_values", issue = "75294")] +#[stable(feature = "map_into_keys_values", since = "1.54.0")] impl<K, V> FusedIterator for IntoValues<K, V> {} #[stable(feature = "btree_range", since = "1.17.0")] |
