diff options
| author | Oliver Middleton <olliemail27@gmail.com> | 2016-09-28 11:28:42 +0100 |
|---|---|---|
| committer | Oliver Middleton <olliemail27@gmail.com> | 2016-10-01 23:58:14 +0100 |
| commit | 06a7dcd35588c0dd6eaa0a523b30e4140ff79868 (patch) | |
| tree | 9f51099430656742ccfc3b1be79f02952de590e4 /src/libcollections | |
| parent | 5045d4e39621b265eca947277f07e23f62608ad0 (diff) | |
| download | rust-06a7dcd35588c0dd6eaa0a523b30e4140ff79868.tar.gz rust-06a7dcd35588c0dd6eaa0a523b30e4140ff79868.zip | |
std: Correct stability attributes for some implementations
These are displayed by rustdoc so should be correct.
Diffstat (limited to 'src/libcollections')
| -rw-r--r-- | src/libcollections/binary_heap.rs | 6 | ||||
| -rw-r--r-- | src/libcollections/btree/map.rs | 35 | ||||
| -rw-r--r-- | src/libcollections/btree/set.rs | 5 | ||||
| -rw-r--r-- | src/libcollections/enum_set.rs | 3 | ||||
| -rw-r--r-- | src/libcollections/str.rs | 2 | ||||
| -rw-r--r-- | src/libcollections/vec.rs | 10 | ||||
| -rw-r--r-- | src/libcollections/vec_deque.rs | 8 |
7 files changed, 53 insertions, 16 deletions
diff --git a/src/libcollections/binary_heap.rs b/src/libcollections/binary_heap.rs index 1fe921543bd..f2624f69624 100644 --- a/src/libcollections/binary_heap.rs +++ b/src/libcollections/binary_heap.rs @@ -1029,7 +1029,7 @@ pub struct Drain<'a, T: 'a> { iter: vec::Drain<'a, T>, } -#[stable(feature = "rust1", since = "1.0.0")] +#[stable(feature = "drain", since = "1.6.0")] impl<'a, T: 'a> Iterator for Drain<'a, T> { type Item = T; @@ -1044,7 +1044,7 @@ impl<'a, T: 'a> Iterator for Drain<'a, T> { } } -#[stable(feature = "rust1", since = "1.0.0")] +#[stable(feature = "drain", since = "1.6.0")] impl<'a, T: 'a> DoubleEndedIterator for Drain<'a, T> { #[inline] fn next_back(&mut self) -> Option<T> { @@ -1052,7 +1052,7 @@ impl<'a, T: 'a> DoubleEndedIterator for Drain<'a, T> { } } -#[stable(feature = "rust1", since = "1.0.0")] +#[stable(feature = "drain", since = "1.6.0")] impl<'a, T: 'a> ExactSizeIterator for Drain<'a, T> {} #[unstable(feature = "fused", issue = "35602")] diff --git a/src/libcollections/btree/map.rs b/src/libcollections/btree/map.rs index 36cb5a1fd9f..788236c24d0 100644 --- a/src/libcollections/btree/map.rs +++ b/src/libcollections/btree/map.rs @@ -136,6 +136,7 @@ pub struct BTreeMap<K, V> { length: usize, } +#[stable(feature = "btree_drop", since = "1.7.0")] impl<K, V> Drop for BTreeMap<K, V> { #[unsafe_destructor_blind_to_params] fn drop(&mut self) { @@ -146,6 +147,7 @@ impl<K, V> Drop for BTreeMap<K, V> { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<K: Clone, V: Clone> Clone for BTreeMap<K, V> { fn clone(&self) -> BTreeMap<K, V> { fn clone_subtree<K: Clone, V: Clone>(node: node::NodeRef<marker::Immut, @@ -1125,6 +1127,7 @@ impl<K: Ord, V> BTreeMap<K, V> { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, K: 'a, V: 'a> IntoIterator for &'a BTreeMap<K, V> { type Item = (&'a K, &'a V); type IntoIter = Iter<'a, K, V>; @@ -1134,6 +1137,7 @@ impl<'a, K: 'a, V: 'a> IntoIterator for &'a BTreeMap<K, V> { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, K: 'a, V: 'a> Iterator for Iter<'a, K, V> { type Item = (&'a K, &'a V); @@ -1154,6 +1158,7 @@ impl<'a, K: 'a, V: 'a> Iterator for Iter<'a, K, V> { #[unstable(feature = "fused", issue = "35602")] impl<'a, K, V> FusedIterator for Iter<'a, K, V> {} +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, K: 'a, V: 'a> DoubleEndedIterator for Iter<'a, K, V> { fn next_back(&mut self) -> Option<(&'a K, &'a V)> { if self.length == 0 { @@ -1165,12 +1170,14 @@ impl<'a, K: 'a, V: 'a> DoubleEndedIterator for Iter<'a, K, V> { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, K: 'a, V: 'a> ExactSizeIterator for Iter<'a, K, V> { fn len(&self) -> usize { self.length } } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, K, V> Clone for Iter<'a, K, V> { fn clone(&self) -> Iter<'a, K, V> { Iter { @@ -1180,6 +1187,7 @@ impl<'a, K, V> Clone for Iter<'a, K, V> { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, K: 'a, V: 'a> IntoIterator for &'a mut BTreeMap<K, V> { type Item = (&'a K, &'a mut V); type IntoIter = IterMut<'a, K, V>; @@ -1189,6 +1197,7 @@ impl<'a, K: 'a, V: 'a> IntoIterator for &'a mut BTreeMap<K, V> { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, K: 'a, V: 'a> Iterator for IterMut<'a, K, V> { type Item = (&'a K, &'a mut V); @@ -1206,6 +1215,7 @@ impl<'a, K: 'a, V: 'a> Iterator for IterMut<'a, K, V> { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, K: 'a, V: 'a> DoubleEndedIterator for IterMut<'a, K, V> { fn next_back(&mut self) -> Option<(&'a K, &'a mut V)> { if self.length == 0 { @@ -1217,6 +1227,7 @@ impl<'a, K: 'a, V: 'a> DoubleEndedIterator for IterMut<'a, K, V> { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, K: 'a, V: 'a> ExactSizeIterator for IterMut<'a, K, V> { fn len(&self) -> usize { self.length @@ -1226,6 +1237,7 @@ impl<'a, K: 'a, V: 'a> ExactSizeIterator for IterMut<'a, K, V> { #[unstable(feature = "fused", issue = "35602")] impl<'a, K, V> FusedIterator for IterMut<'a, K, V> {} +#[stable(feature = "rust1", since = "1.0.0")] impl<K, V> IntoIterator for BTreeMap<K, V> { type Item = (K, V); type IntoIter = IntoIter<K, V>; @@ -1244,6 +1256,7 @@ impl<K, V> IntoIterator for BTreeMap<K, V> { } } +#[stable(feature = "btree_drop", since = "1.7.0")] impl<K, V> Drop for IntoIter<K, V> { fn drop(&mut self) { for _ in &mut *self { @@ -1260,6 +1273,7 @@ impl<K, V> Drop for IntoIter<K, V> { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<K, V> Iterator for IntoIter<K, V> { type Item = (K, V); @@ -1304,6 +1318,7 @@ impl<K, V> Iterator for IntoIter<K, V> { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<K, V> DoubleEndedIterator for IntoIter<K, V> { fn next_back(&mut self) -> Option<(K, V)> { if self.length == 0 { @@ -1342,6 +1357,7 @@ impl<K, V> DoubleEndedIterator for IntoIter<K, V> { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<K, V> ExactSizeIterator for IntoIter<K, V> { fn len(&self) -> usize { self.length @@ -1351,6 +1367,7 @@ impl<K, V> ExactSizeIterator for IntoIter<K, V> { #[unstable(feature = "fused", issue = "35602")] impl<K, V> FusedIterator for IntoIter<K, V> {} +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, K, V> Iterator for Keys<'a, K, V> { type Item = &'a K; @@ -1363,12 +1380,14 @@ impl<'a, K, V> Iterator for Keys<'a, K, V> { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, K, V> DoubleEndedIterator for Keys<'a, K, V> { fn next_back(&mut self) -> Option<&'a K> { self.inner.next_back().map(|(k, _)| k) } } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, K, V> ExactSizeIterator for Keys<'a, K, V> { fn len(&self) -> usize { self.inner.len() @@ -1378,12 +1397,14 @@ impl<'a, K, V> ExactSizeIterator for Keys<'a, K, V> { #[unstable(feature = "fused", issue = "35602")] impl<'a, K, V> FusedIterator for Keys<'a, K, V> {} +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, K, V> Clone for Keys<'a, K, V> { fn clone(&self) -> Keys<'a, K, V> { Keys { inner: self.inner.clone() } } } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, K, V> Iterator for Values<'a, K, V> { type Item = &'a V; @@ -1396,12 +1417,14 @@ impl<'a, K, V> Iterator for Values<'a, K, V> { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, K, V> DoubleEndedIterator for Values<'a, K, V> { fn next_back(&mut self) -> Option<&'a V> { self.inner.next_back().map(|(_, v)| v) } } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, K, V> ExactSizeIterator for Values<'a, K, V> { fn len(&self) -> usize { self.inner.len() @@ -1411,6 +1434,7 @@ impl<'a, K, V> ExactSizeIterator for Values<'a, K, V> { #[unstable(feature = "fused", issue = "35602")] impl<'a, K, V> FusedIterator for Values<'a, K, V> {} +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, K, V> Clone for Values<'a, K, V> { fn clone(&self) -> Values<'a, K, V> { Values { inner: self.inner.clone() } @@ -1635,6 +1659,7 @@ impl<'a, K, V> RangeMut<'a, K, V> { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<K: Ord, V> FromIterator<(K, V)> for BTreeMap<K, V> { fn from_iter<T: IntoIterator<Item = (K, V)>>(iter: T) -> BTreeMap<K, V> { let mut map = BTreeMap::new(); @@ -1643,6 +1668,7 @@ impl<K: Ord, V> FromIterator<(K, V)> for BTreeMap<K, V> { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<K: Ord, V> Extend<(K, V)> for BTreeMap<K, V> { #[inline] fn extend<T: IntoIterator<Item = (K, V)>>(&mut self, iter: T) { @@ -1652,12 +1678,14 @@ impl<K: Ord, V> Extend<(K, V)> for BTreeMap<K, V> { } } +#[stable(feature = "extend_ref", since = "1.2.0")] impl<'a, K: Ord + Copy, V: Copy> Extend<(&'a K, &'a V)> for BTreeMap<K, V> { fn extend<I: IntoIterator<Item = (&'a K, &'a V)>>(&mut self, iter: I) { self.extend(iter.into_iter().map(|(&key, &value)| (key, value))); } } +#[stable(feature = "rust1", since = "1.0.0")] impl<K: Hash, V: Hash> Hash for BTreeMap<K, V> { fn hash<H: Hasher>(&self, state: &mut H) { for elt in self { @@ -1666,6 +1694,7 @@ impl<K: Hash, V: Hash> Hash for BTreeMap<K, V> { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<K: Ord, V> Default for BTreeMap<K, V> { /// Creates an empty `BTreeMap<K, V>`. fn default() -> BTreeMap<K, V> { @@ -1673,14 +1702,17 @@ impl<K: Ord, V> Default for BTreeMap<K, V> { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<K: PartialEq, V: PartialEq> PartialEq for BTreeMap<K, V> { fn eq(&self, other: &BTreeMap<K, V>) -> bool { self.len() == other.len() && self.iter().zip(other).all(|(a, b)| a == b) } } +#[stable(feature = "rust1", since = "1.0.0")] impl<K: Eq, V: Eq> Eq for BTreeMap<K, V> {} +#[stable(feature = "rust1", since = "1.0.0")] impl<K: PartialOrd, V: PartialOrd> PartialOrd for BTreeMap<K, V> { #[inline] fn partial_cmp(&self, other: &BTreeMap<K, V>) -> Option<Ordering> { @@ -1688,6 +1720,7 @@ impl<K: PartialOrd, V: PartialOrd> PartialOrd for BTreeMap<K, V> { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<K: Ord, V: Ord> Ord for BTreeMap<K, V> { #[inline] fn cmp(&self, other: &BTreeMap<K, V>) -> Ordering { @@ -1695,12 +1728,14 @@ impl<K: Ord, V: Ord> Ord for BTreeMap<K, V> { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<K: Debug, V: Debug> Debug for BTreeMap<K, V> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_map().entries(self.iter()).finish() } } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, K: Ord, Q: ?Sized, V> Index<&'a Q> for BTreeMap<K, V> where K: Borrow<Q>, Q: Ord diff --git a/src/libcollections/btree/set.rs b/src/libcollections/btree/set.rs index fc2a7f82547..c57266d9e3b 100644 --- a/src/libcollections/btree/set.rs +++ b/src/libcollections/btree/set.rs @@ -779,6 +779,7 @@ impl<T: Debug> Debug for BTreeSet<T> { } } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, T> Clone for Iter<'a, T> { fn clone(&self) -> Iter<'a, T> { Iter { iter: self.iter.clone() } @@ -864,6 +865,7 @@ fn cmp_opt<T: Ord>(x: Option<&T>, y: Option<&T>, short: Ordering, long: Ordering } } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, T> Clone for Difference<'a, T> { fn clone(&self) -> Difference<'a, T> { Difference { @@ -901,6 +903,7 @@ impl<'a, T: Ord> Iterator for Difference<'a, T> { #[unstable(feature = "fused", issue = "35602")] impl<'a, T: Ord> FusedIterator for Difference<'a, T> {} +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, T> Clone for SymmetricDifference<'a, T> { fn clone(&self) -> SymmetricDifference<'a, T> { SymmetricDifference { @@ -934,6 +937,7 @@ impl<'a, T: Ord> Iterator for SymmetricDifference<'a, T> { #[unstable(feature = "fused", issue = "35602")] impl<'a, T: Ord> FusedIterator for SymmetricDifference<'a, T> {} +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, T> Clone for Intersection<'a, T> { fn clone(&self) -> Intersection<'a, T> { Intersection { @@ -977,6 +981,7 @@ impl<'a, T: Ord> Iterator for Intersection<'a, T> { #[unstable(feature = "fused", issue = "35602")] impl<'a, T: Ord> FusedIterator for Intersection<'a, T> {} +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, T> Clone for Union<'a, T> { fn clone(&self) -> Union<'a, T> { Union { diff --git a/src/libcollections/enum_set.rs b/src/libcollections/enum_set.rs index 2456a04e40a..2d12b4ccffe 100644 --- a/src/libcollections/enum_set.rs +++ b/src/libcollections/enum_set.rs @@ -48,7 +48,6 @@ impl<E> Clone for EnumSet<E> { } } -#[stable(feature = "rust1", since = "1.0.0")] impl<E: CLike + fmt::Debug> fmt::Debug for EnumSet<E> { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { fmt.debug_set().entries(self).finish() @@ -277,7 +276,6 @@ impl<E: CLike> FromIterator<E> for EnumSet<E> { } } -#[stable(feature = "rust1", since = "1.0.0")] impl<'a, E> IntoIterator for &'a EnumSet<E> where E: CLike { type Item = E; @@ -296,7 +294,6 @@ impl<E: CLike> Extend<E> for EnumSet<E> { } } -#[stable(feature = "extend_ref", since = "1.2.0")] impl<'a, E: 'a + CLike + Copy> Extend<&'a E> for EnumSet<E> { fn extend<I: IntoIterator<Item = &'a E>>(&mut self, iter: I) { self.extend(iter.into_iter().cloned()); diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs index 96efe1a03e3..3c4c2c9f61e 100644 --- a/src/libcollections/str.rs +++ b/src/libcollections/str.rs @@ -122,7 +122,7 @@ pub struct EncodeUtf16<'a> { encoder: Utf16Encoder<Chars<'a>>, } -#[stable(feature = "rust1", since = "1.0.0")] +#[stable(feature = "encode_utf16", since = "1.8.0")] impl<'a> Iterator for EncodeUtf16<'a> { type Item = u16; diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index ed6eb62c967..54fd19dbe30 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -1755,7 +1755,7 @@ pub struct IntoIter<T> { end: *const T, } -#[stable(feature = "vec_intoiter_debug", since = "")] +#[stable(feature = "vec_intoiter_debug", since = "1.13.0")] impl<T: fmt::Debug> fmt::Debug for IntoIter<T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_tuple("IntoIter") @@ -1929,7 +1929,7 @@ unsafe impl<'a, T: Sync> Sync for Drain<'a, T> {} #[stable(feature = "drain", since = "1.6.0")] unsafe impl<'a, T: Send> Send for Drain<'a, T> {} -#[stable(feature = "rust1", since = "1.0.0")] +#[stable(feature = "drain", since = "1.6.0")] impl<'a, T> Iterator for Drain<'a, T> { type Item = T; @@ -1943,7 +1943,7 @@ impl<'a, T> Iterator for Drain<'a, T> { } } -#[stable(feature = "rust1", since = "1.0.0")] +#[stable(feature = "drain", since = "1.6.0")] impl<'a, T> DoubleEndedIterator for Drain<'a, T> { #[inline] fn next_back(&mut self) -> Option<T> { @@ -1951,7 +1951,7 @@ impl<'a, T> DoubleEndedIterator for Drain<'a, T> { } } -#[stable(feature = "rust1", since = "1.0.0")] +#[stable(feature = "drain", since = "1.6.0")] impl<'a, T> Drop for Drain<'a, T> { fn drop(&mut self) { // exhaust self first @@ -1973,7 +1973,7 @@ impl<'a, T> Drop for Drain<'a, T> { } -#[stable(feature = "rust1", since = "1.0.0")] +#[stable(feature = "drain", since = "1.6.0")] impl<'a, T> ExactSizeIterator for Drain<'a, T> {} #[unstable(feature = "fused", issue = "35602")] diff --git a/src/libcollections/vec_deque.rs b/src/libcollections/vec_deque.rs index 452e9f74829..cfed647f5d8 100644 --- a/src/libcollections/vec_deque.rs +++ b/src/libcollections/vec_deque.rs @@ -2002,7 +2002,7 @@ unsafe impl<'a, T: Sync> Sync for Drain<'a, T> {} #[stable(feature = "drain", since = "1.6.0")] unsafe impl<'a, T: Send> Send for Drain<'a, T> {} -#[stable(feature = "rust1", since = "1.0.0")] +#[stable(feature = "drain", since = "1.6.0")] impl<'a, T: 'a> Drop for Drain<'a, T> { fn drop(&mut self) { for _ in self.by_ref() {} @@ -2051,7 +2051,7 @@ impl<'a, T: 'a> Drop for Drain<'a, T> { } } -#[stable(feature = "rust1", since = "1.0.0")] +#[stable(feature = "drain", since = "1.6.0")] impl<'a, T: 'a> Iterator for Drain<'a, T> { type Item = T; @@ -2066,7 +2066,7 @@ impl<'a, T: 'a> Iterator for Drain<'a, T> { } } -#[stable(feature = "rust1", since = "1.0.0")] +#[stable(feature = "drain", since = "1.6.0")] impl<'a, T: 'a> DoubleEndedIterator for Drain<'a, T> { #[inline] fn next_back(&mut self) -> Option<T> { @@ -2074,7 +2074,7 @@ impl<'a, T: 'a> DoubleEndedIterator for Drain<'a, T> { } } -#[stable(feature = "rust1", since = "1.0.0")] +#[stable(feature = "drain", since = "1.6.0")] impl<'a, T: 'a> ExactSizeIterator for Drain<'a, T> {} #[unstable(feature = "fused", issue = "35602")] |
