Skip to content

Commit 605225a

Browse files
committed
std: Rename IntoIterator::Iter to IntoIter
This is in preparation for stabilization of the `IntoIterator` trait. All implementations and references to `Iter` need to be renamed to `IntoIter`. [breaking-change]
1 parent 64a4dec commit 605225a

File tree

14 files changed

+34
-34
lines changed

14 files changed

+34
-34
lines changed

src/libcollections/binary_heap.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -656,15 +656,15 @@ impl<T: Ord> FromIterator<T> for BinaryHeap<T> {
656656
}
657657

658658
impl<T: Ord> IntoIterator for BinaryHeap<T> {
659-
type Iter = IntoIter<T>;
659+
type IntoIter = IntoIter<T>;
660660

661661
fn into_iter(self) -> IntoIter<T> {
662662
self.into_iter()
663663
}
664664
}
665665

666666
impl<'a, T> IntoIterator for &'a BinaryHeap<T> where T: Ord {
667-
type Iter = Iter<'a, T>;
667+
type IntoIter = Iter<'a, T>;
668668

669669
fn into_iter(self) -> Iter<'a, T> {
670670
self.iter()

src/libcollections/bit.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ impl<'a> RandomAccessIterator for Iter<'a> {
10711071
}
10721072

10731073
impl<'a> IntoIterator for &'a Bitv {
1074-
type Iter = Iter<'a>;
1074+
type IntoIter = Iter<'a>;
10751075

10761076
fn into_iter(self) -> Iter<'a> {
10771077
self.iter()
@@ -1883,7 +1883,7 @@ impl<'a> Iterator for SymmetricDifference<'a> {
18831883
}
18841884

18851885
impl<'a> IntoIterator for &'a BitvSet {
1886-
type Iter = SetIter<'a>;
1886+
type IntoIter = SetIter<'a>;
18871887

18881888
fn into_iter(self) -> SetIter<'a> {
18891889
self.iter()

src/libcollections/btree/map.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -463,23 +463,23 @@ impl<K: Ord, V> BTreeMap<K, V> {
463463
}
464464

465465
impl<K, V> IntoIterator for BTreeMap<K, V> {
466-
type Iter = IntoIter<K, V>;
466+
type IntoIter = IntoIter<K, V>;
467467

468468
fn into_iter(self) -> IntoIter<K, V> {
469469
self.into_iter()
470470
}
471471
}
472472

473473
impl<'a, K, V> IntoIterator for &'a BTreeMap<K, V> {
474-
type Iter = Iter<'a, K, V>;
474+
type IntoIter = Iter<'a, K, V>;
475475

476476
fn into_iter(self) -> Iter<'a, K, V> {
477477
self.iter()
478478
}
479479
}
480480

481481
impl<'a, K, V> IntoIterator for &'a mut BTreeMap<K, V> {
482-
type Iter = IterMut<'a, K, V>;
482+
type IntoIter = IterMut<'a, K, V>;
483483

484484
fn into_iter(mut self) -> IterMut<'a, K, V> {
485485
self.iter_mut()

src/libcollections/btree/set.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -481,15 +481,15 @@ impl<T: Ord> FromIterator<T> for BTreeSet<T> {
481481
}
482482

483483
impl<T> IntoIterator for BTreeSet<T> {
484-
type Iter = IntoIter<T>;
484+
type IntoIter = IntoIter<T>;
485485

486486
fn into_iter(self) -> IntoIter<T> {
487487
self.into_iter()
488488
}
489489
}
490490

491491
impl<'a, T> IntoIterator for &'a BTreeSet<T> {
492-
type Iter = Iter<'a, T>;
492+
type IntoIter = Iter<'a, T>;
493493

494494
fn into_iter(self) -> Iter<'a, T> {
495495
self.iter()

src/libcollections/dlist.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -831,23 +831,23 @@ impl<A> FromIterator<A> for DList<A> {
831831
}
832832

833833
impl<T> IntoIterator for DList<T> {
834-
type Iter = IntoIter<T>;
834+
type IntoIter = IntoIter<T>;
835835

836836
fn into_iter(self) -> IntoIter<T> {
837837
self.into_iter()
838838
}
839839
}
840840

841841
impl<'a, T> IntoIterator for &'a DList<T> {
842-
type Iter = Iter<'a, T>;
842+
type IntoIter = Iter<'a, T>;
843843

844844
fn into_iter(self) -> Iter<'a, T> {
845845
self.iter()
846846
}
847847
}
848848

849849
impl<'a, T> IntoIterator for &'a mut DList<T> {
850-
type Iter = IterMut<'a, T>;
850+
type IntoIter = IterMut<'a, T>;
851851

852852
fn into_iter(mut self) -> IterMut<'a, T> {
853853
self.iter_mut()

src/libcollections/enum_set.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ impl<E:CLike> FromIterator<E> for EnumSet<E> {
258258
}
259259

260260
impl<'a, E> IntoIterator for &'a EnumSet<E> where E: CLike {
261-
type Iter = Iter<E>;
261+
type IntoIter = Iter<E>;
262262

263263
fn into_iter(self) -> Iter<E> {
264264
self.iter()

src/libcollections/ring_buf.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1608,23 +1608,23 @@ impl<A> FromIterator<A> for RingBuf<A> {
16081608
}
16091609

16101610
impl<T> IntoIterator for RingBuf<T> {
1611-
type Iter = IntoIter<T>;
1611+
type IntoIter = IntoIter<T>;
16121612

16131613
fn into_iter(self) -> IntoIter<T> {
16141614
self.into_iter()
16151615
}
16161616
}
16171617

16181618
impl<'a, T> IntoIterator for &'a RingBuf<T> {
1619-
type Iter = Iter<'a, T>;
1619+
type IntoIter = Iter<'a, T>;
16201620

16211621
fn into_iter(self) -> Iter<'a, T> {
16221622
self.iter()
16231623
}
16241624
}
16251625

16261626
impl<'a, T> IntoIterator for &'a mut RingBuf<T> {
1627-
type Iter = IterMut<'a, T>;
1627+
type IntoIter = IterMut<'a, T>;
16281628

16291629
fn into_iter(mut self) -> IterMut<'a, T> {
16301630
self.iter_mut()

src/libcollections/vec.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1388,23 +1388,23 @@ impl<T> FromIterator<T> for Vec<T> {
13881388
}
13891389

13901390
impl<T> IntoIterator for Vec<T> {
1391-
type Iter = IntoIter<T>;
1391+
type IntoIter = IntoIter<T>;
13921392

13931393
fn into_iter(self) -> IntoIter<T> {
13941394
self.into_iter()
13951395
}
13961396
}
13971397

13981398
impl<'a, T> IntoIterator for &'a Vec<T> {
1399-
type Iter = slice::Iter<'a, T>;
1399+
type IntoIter = slice::Iter<'a, T>;
14001400

14011401
fn into_iter(self) -> slice::Iter<'a, T> {
14021402
self.iter()
14031403
}
14041404
}
14051405

14061406
impl<'a, T> IntoIterator for &'a mut Vec<T> {
1407-
type Iter = slice::IterMut<'a, T>;
1407+
type IntoIter = slice::IterMut<'a, T>;
14081408

14091409
fn into_iter(mut self) -> slice::IterMut<'a, T> {
14101410
self.iter_mut()

src/libcollections/vec_map.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -669,23 +669,23 @@ impl<V> FromIterator<(usize, V)> for VecMap<V> {
669669
}
670670

671671
impl<T> IntoIterator for VecMap<T> {
672-
type Iter = IntoIter<T>;
672+
type IntoIter = IntoIter<T>;
673673

674674
fn into_iter(self) -> IntoIter<T> {
675675
self.into_iter()
676676
}
677677
}
678678

679679
impl<'a, T> IntoIterator for &'a VecMap<T> {
680-
type Iter = Iter<'a, T>;
680+
type IntoIter = Iter<'a, T>;
681681

682682
fn into_iter(self) -> Iter<'a, T> {
683683
self.iter()
684684
}
685685
}
686686

687687
impl<'a, T> IntoIterator for &'a mut VecMap<T> {
688-
type Iter = IterMut<'a, T>;
688+
type IntoIter = IterMut<'a, T>;
689689

690690
fn into_iter(mut self) -> IterMut<'a, T> {
691691
self.iter_mut()

src/libcore/array.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ macro_rules! array_impls {
4949
}
5050

5151
impl<'a, T> IntoIterator for &'a [T; $N] {
52-
type Iter = Iter<'a, T>;
52+
type IntoIter = Iter<'a, T>;
5353

5454
fn into_iter(self) -> Iter<'a, T> {
5555
self.iter()
5656
}
5757
}
5858

5959
impl<'a, T> IntoIterator for &'a mut [T; $N] {
60-
type Iter = IterMut<'a, T>;
60+
type IntoIter = IterMut<'a, T>;
6161

6262
fn into_iter(self) -> IterMut<'a, T> {
6363
self.iter_mut()

src/libcore/iter.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,14 @@ pub trait FromIterator<A> {
120120

121121
/// Conversion into an `Iterator`
122122
pub trait IntoIterator {
123-
type Iter: Iterator;
123+
type IntoIter: Iterator;
124124

125125
/// Consumes `Self` and returns an iterator over it
126-
fn into_iter(self) -> Self::Iter;
126+
fn into_iter(self) -> Self::IntoIter;
127127
}
128128

129129
impl<I> IntoIterator for I where I: Iterator {
130-
type Iter = I;
130+
type IntoIter = I;
131131

132132
fn into_iter(self) -> I {
133133
self

src/libcore/slice.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -628,15 +628,15 @@ impl<'a, T> Default for &'a [T] {
628628
//
629629

630630
impl<'a, T> IntoIterator for &'a [T] {
631-
type Iter = Iter<'a, T>;
631+
type IntoIter = Iter<'a, T>;
632632

633633
fn into_iter(self) -> Iter<'a, T> {
634634
self.iter()
635635
}
636636
}
637637

638638
impl<'a, T> IntoIterator for &'a mut [T] {
639-
type Iter = IterMut<'a, T>;
639+
type IntoIter = IterMut<'a, T>;
640640

641641
fn into_iter(self) -> IterMut<'a, T> {
642642
self.iter_mut()

src/libstd/collections/hash/map.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,7 @@ impl<'a, K, V, S, H> IntoIterator for &'a HashMap<K, V, S>
13771377
S: HashState<Hasher=H>,
13781378
H: hash::Hasher<Output=u64>
13791379
{
1380-
type Iter = Iter<'a, K, V>;
1380+
type IntoIter = Iter<'a, K, V>;
13811381

13821382
fn into_iter(self) -> Iter<'a, K, V> {
13831383
self.iter()
@@ -1389,7 +1389,7 @@ impl<'a, K, V, S, H> IntoIterator for &'a mut HashMap<K, V, S>
13891389
S: HashState<Hasher=H>,
13901390
H: hash::Hasher<Output=u64>
13911391
{
1392-
type Iter = IterMut<'a, K, V>;
1392+
type IntoIter = IterMut<'a, K, V>;
13931393

13941394
fn into_iter(mut self) -> IterMut<'a, K, V> {
13951395
self.iter_mut()
@@ -1401,7 +1401,7 @@ impl<K, V, S, H> IntoIterator for HashMap<K, V, S>
14011401
S: HashState<Hasher=H>,
14021402
H: hash::Hasher<Output=u64>
14031403
{
1404-
type Iter = IntoIter<K, V>;
1404+
type IntoIter = IntoIter<K, V>;
14051405

14061406
fn into_iter(self) -> IntoIter<K, V> {
14071407
self.into_iter()

src/libstd/collections/hash/set.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ impl<'a, T, S, H> IntoIterator for &'a HashSet<T, S>
840840
S: HashState<Hasher=H>,
841841
H: hash::Hasher<Output=u64>
842842
{
843-
type Iter = Iter<'a, T>;
843+
type IntoIter = Iter<'a, T>;
844844

845845
fn into_iter(self) -> Iter<'a, T> {
846846
self.iter()
@@ -852,7 +852,7 @@ impl<T, S, H> IntoIterator for HashSet<T, S>
852852
S: HashState<Hasher=H>,
853853
H: hash::Hasher<Output=u64>
854854
{
855-
type Iter = IntoIter<T>;
855+
type IntoIter = IntoIter<T>;
856856

857857
fn into_iter(self) -> IntoIter<T> {
858858
self.into_iter()

0 commit comments

Comments
 (0)