diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2015-02-18 23:50:21 +1100 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2015-02-18 23:50:21 +1100 |
| commit | dfc5c0f1e8799f47f9033bdcc8a7cd8a217620a5 (patch) | |
| tree | e9c32f2e58b3462a23dd9c472d2f236640b78811 /src/libstd/collections/hash | |
| parent | 6c065fc8cb036785f61ff03e05c1563cbb2dd081 (diff) | |
| parent | 47f91a9484eceef10536d4caac6ef578cd254567 (diff) | |
| download | rust-dfc5c0f1e8799f47f9033bdcc8a7cd8a217620a5.tar.gz rust-dfc5c0f1e8799f47f9033bdcc8a7cd8a217620a5.zip | |
Manual merge of #22475 - alexcrichton:rollup, r=alexcrichton
One windows bot failed spuriously.
Diffstat (limited to 'src/libstd/collections/hash')
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 48 | ||||
| -rw-r--r-- | src/libstd/collections/hash/set.rs | 32 |
2 files changed, 5 insertions, 75 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index 241e409910f..1b9f8b99017 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1372,21 +1372,7 @@ enum VacantEntryState<K, V, M> { NoElem(EmptyBucket<K, V, M>), } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, K, V, S, H> IntoIterator for &'a HashMap<K, V, S> - where K: Eq + Hash<H>, - S: HashState<Hasher=H>, - H: hash::Hasher<Output=u64> -{ - type IntoIter = Iter<'a, K, V>; - - fn into_iter(self) -> Iter<'a, K, V> { - self.iter() - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, K, V, S, H> IntoIterator for &'a HashMap<K, V, S> where K: Eq + Hash<H>, S: HashState<Hasher=H>, @@ -1400,21 +1386,7 @@ impl<'a, K, V, S, H> IntoIterator for &'a HashMap<K, V, S> } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, K, V, S, H> IntoIterator for &'a mut HashMap<K, V, S> - where K: Eq + Hash<H>, - S: HashState<Hasher=H>, - H: hash::Hasher<Output=u64> -{ - type IntoIter = IterMut<'a, K, V>; - - fn into_iter(mut self) -> IterMut<'a, K, V> { - self.iter_mut() - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, K, V, S, H> IntoIterator for &'a mut HashMap<K, V, S> where K: Eq + Hash<H>, S: HashState<Hasher=H>, @@ -1428,21 +1400,7 @@ impl<'a, K, V, S, H> IntoIterator for &'a mut HashMap<K, V, S> } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<K, V, S, H> IntoIterator for HashMap<K, V, S> - where K: Eq + Hash<H>, - S: HashState<Hasher=H>, - H: hash::Hasher<Output=u64> -{ - type IntoIter = IntoIter<K, V>; - - fn into_iter(self) -> IntoIter<K, V> { - self.into_iter() - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot +#[stable(feature = "rust1", since = "1.0.0")] impl<K, V, S, H> IntoIterator for HashMap<K, V, S> where K: Eq + Hash<H>, S: HashState<Hasher=H>, diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index 300e2089317..5fbbcb3b347 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -835,21 +835,7 @@ pub struct Union<'a, T: 'a, S: 'a> { iter: Chain<Iter<'a, T>, Difference<'a, T, S>> } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, T, S, H> IntoIterator for &'a HashSet<T, S> - where T: Eq + Hash<H>, - S: HashState<Hasher=H>, - H: hash::Hasher<Output=u64> -{ - type IntoIter = Iter<'a, T>; - - fn into_iter(self) -> Iter<'a, T> { - self.iter() - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot +#[stable(feature = "rust1", since = "1.0.0")] impl<'a, T, S, H> IntoIterator for &'a HashSet<T, S> where T: Eq + Hash<H>, S: HashState<Hasher=H>, @@ -863,21 +849,7 @@ impl<'a, T, S, H> IntoIterator for &'a HashSet<T, S> } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<T, S, H> IntoIterator for HashSet<T, S> - where T: Eq + Hash<H>, - S: HashState<Hasher=H>, - H: hash::Hasher<Output=u64> -{ - type IntoIter = IntoIter<T>; - - fn into_iter(self) -> IntoIter<T> { - self.into_iter() - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot +#[stable(feature = "rust1", since = "1.0.0")] impl<T, S, H> IntoIterator for HashSet<T, S> where T: Eq + Hash<H>, S: HashState<Hasher=H>, |
