diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2015-11-16 19:54:28 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2015-11-18 01:24:21 +0300 |
| commit | 7e2ffc7090a70fe8c77a0e03fcec3cb1387141f2 (patch) | |
| tree | 63f67955eac7b8d88a7a771a958948500d4d9f15 /src/libstd/collections | |
| parent | 52acc05f6398d70e8cc506e19bb9fefbed7368ac (diff) | |
| download | rust-7e2ffc7090a70fe8c77a0e03fcec3cb1387141f2.tar.gz rust-7e2ffc7090a70fe8c77a0e03fcec3cb1387141f2.zip | |
Add missing annotations and some tests
Diffstat (limited to 'src/libstd/collections')
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 4 | ||||
| -rw-r--r-- | src/libstd/collections/hash/set.rs | 5 | ||||
| -rw-r--r-- | src/libstd/collections/mod.rs | 10 |
3 files changed, 18 insertions, 1 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index b8482b3a2dc..c8b377ba3be 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1215,6 +1215,7 @@ fn search_entry_hashed<'a, K: Eq, V>(table: &'a mut RawTable<K,V>, hash: SafeHas } } +#[stable(feature = "rust1", since = "1.0.0")] impl<K, V, S> PartialEq for HashMap<K, V, S> where K: Eq + Hash, V: PartialEq, S: HashState { @@ -1272,6 +1273,7 @@ pub struct Iter<'a, K: 'a, V: 'a> { } // FIXME(#19839) Remove in favor of `#[derive(Clone)]` +#[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 { @@ -1299,6 +1301,7 @@ pub struct Keys<'a, K: 'a, V: 'a> { } // FIXME(#19839) Remove in favor of `#[derive(Clone)]` +#[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 { @@ -1314,6 +1317,7 @@ pub struct Values<'a, K: 'a, V: 'a> { } // FIXME(#19839) Remove in favor of `#[derive(Clone)]` +#[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 { diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index bb7a96bfb4b..0021155b00a 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -901,6 +901,7 @@ impl<T, S> IntoIterator for HashSet<T, S> } } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, K> Clone for Iter<'a, K> { fn clone(&self) -> Iter<'a, K> { Iter { iter: self.iter.clone() } } } @@ -940,6 +941,7 @@ impl<'a, K> ExactSizeIterator for Drain<'a, K> { fn len(&self) -> usize { self.iter.len() } } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, T, S> Clone for Intersection<'a, T, S> { fn clone(&self) -> Intersection<'a, T, S> { Intersection { iter: self.iter.clone(), ..*self } @@ -969,6 +971,7 @@ impl<'a, T, S> Iterator for Intersection<'a, T, S> } } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, T, S> Clone for Difference<'a, T, S> { fn clone(&self) -> Difference<'a, T, S> { Difference { iter: self.iter.clone(), ..*self } @@ -998,6 +1001,7 @@ impl<'a, T, S> Iterator for Difference<'a, T, S> } } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, T, S> Clone for SymmetricDifference<'a, T, S> { fn clone(&self) -> SymmetricDifference<'a, T, S> { SymmetricDifference { iter: self.iter.clone() } @@ -1014,6 +1018,7 @@ impl<'a, T, S> Iterator for SymmetricDifference<'a, T, S> fn size_hint(&self) -> (usize, Option<usize>) { self.iter.size_hint() } } +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, T, S> Clone for Union<'a, T, S> { fn clone(&self) -> Union<'a, T, S> { Union { iter: self.iter.clone() } } } diff --git a/src/libstd/collections/mod.rs b/src/libstd/collections/mod.rs index 71d9fbfaa3e..07ddfe237be 100644 --- a/src/libstd/collections/mod.rs +++ b/src/libstd/collections/mod.rs @@ -408,14 +408,20 @@ #![stable(feature = "rust1", since = "1.0.0")] +#[stable(feature = "rust1", since = "1.0.0")] pub use core_collections::Bound; +#[stable(feature = "rust1", since = "1.0.0")] pub use core_collections::{BinaryHeap, BTreeMap, BTreeSet}; +#[stable(feature = "rust1", since = "1.0.0")] pub use core_collections::{LinkedList, VecDeque}; - +#[stable(feature = "rust1", since = "1.0.0")] pub use core_collections::{binary_heap, btree_map, btree_set}; +#[stable(feature = "rust1", since = "1.0.0")] pub use core_collections::{linked_list, vec_deque}; +#[stable(feature = "rust1", since = "1.0.0")] pub use self::hash_map::HashMap; +#[stable(feature = "rust1", since = "1.0.0")] pub use self::hash_set::HashSet; mod hash; @@ -423,12 +429,14 @@ mod hash; #[stable(feature = "rust1", since = "1.0.0")] pub mod hash_map { //! A hashmap + #[stable(feature = "rust1", since = "1.0.0")] pub use super::hash::map::*; } #[stable(feature = "rust1", since = "1.0.0")] pub mod hash_set { //! A hashset + #[stable(feature = "rust1", since = "1.0.0")] pub use super::hash::set::*; } |
