Skip to content

Commit c933413

Browse files
committed
---
yaml --- r: 168666 b: refs/heads/batch c: 1f62869 h: refs/heads/master v: v3
1 parent d3aac0f commit c933413

File tree

139 files changed

+833
-1812
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+833
-1812
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2929
refs/heads/issue-18208-method-dispatch-2: 9e1eae4fb9b6527315b4441cf8a0f5ca911d1671
3030
refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
32-
refs/heads/batch: c6c786671d692d7b13c2e5c68a53001327b4b125
32+
refs/heads/batch: 1f62869120123caeeecad89e7e99c5339a3987b7
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970

branches/batch/src/libcollections/binary_heap.rs

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -573,9 +573,7 @@ impl<'a, T> Clone for Iter<'a, T> {
573573
}
574574

575575
#[stable]
576-
impl<'a, T> Iterator for Iter<'a, T> {
577-
type Item = &'a T;
578-
576+
impl<'a, T> Iterator<&'a T> for Iter<'a, T> {
579577
#[inline]
580578
fn next(&mut self) -> Option<&'a T> { self.iter.next() }
581579

@@ -584,23 +582,21 @@ impl<'a, T> Iterator for Iter<'a, T> {
584582
}
585583

586584
#[stable]
587-
impl<'a, T> DoubleEndedIterator for Iter<'a, T> {
585+
impl<'a, T> DoubleEndedIterator<&'a T> for Iter<'a, T> {
588586
#[inline]
589587
fn next_back(&mut self) -> Option<&'a T> { self.iter.next_back() }
590588
}
591589

592590
#[stable]
593-
impl<'a, T> ExactSizeIterator for Iter<'a, T> {}
591+
impl<'a, T> ExactSizeIterator<&'a T> for Iter<'a, T> {}
594592

595593
/// An iterator that moves out of a `BinaryHeap`.
596594
pub struct IntoIter<T> {
597595
iter: vec::IntoIter<T>,
598596
}
599597

600598
#[stable]
601-
impl<T> Iterator for IntoIter<T> {
602-
type Item = T;
603-
599+
impl<T> Iterator<T> for IntoIter<T> {
604600
#[inline]
605601
fn next(&mut self) -> Option<T> { self.iter.next() }
606602

@@ -609,23 +605,21 @@ impl<T> Iterator for IntoIter<T> {
609605
}
610606

611607
#[stable]
612-
impl<T> DoubleEndedIterator for IntoIter<T> {
608+
impl<T> DoubleEndedIterator<T> for IntoIter<T> {
613609
#[inline]
614610
fn next_back(&mut self) -> Option<T> { self.iter.next_back() }
615611
}
616612

617613
#[stable]
618-
impl<T> ExactSizeIterator for IntoIter<T> {}
614+
impl<T> ExactSizeIterator<T> for IntoIter<T> {}
619615

620616
/// An iterator that drains a `BinaryHeap`.
621617
pub struct Drain<'a, T: 'a> {
622618
iter: vec::Drain<'a, T>,
623619
}
624620

625621
#[stable]
626-
impl<'a, T: 'a> Iterator for Drain<'a, T> {
627-
type Item = T;
628-
622+
impl<'a, T: 'a> Iterator<T> for Drain<'a, T> {
629623
#[inline]
630624
fn next(&mut self) -> Option<T> { self.iter.next() }
631625

@@ -634,24 +628,24 @@ impl<'a, T: 'a> Iterator for Drain<'a, T> {
634628
}
635629

636630
#[stable]
637-
impl<'a, T: 'a> DoubleEndedIterator for Drain<'a, T> {
631+
impl<'a, T: 'a> DoubleEndedIterator<T> for Drain<'a, T> {
638632
#[inline]
639633
fn next_back(&mut self) -> Option<T> { self.iter.next_back() }
640634
}
641635

642636
#[stable]
643-
impl<'a, T: 'a> ExactSizeIterator for Drain<'a, T> {}
637+
impl<'a, T: 'a> ExactSizeIterator<T> for Drain<'a, T> {}
644638

645639
#[stable]
646640
impl<T: Ord> FromIterator<T> for BinaryHeap<T> {
647-
fn from_iter<Iter: Iterator<Item=T>>(iter: Iter) -> BinaryHeap<T> {
641+
fn from_iter<Iter: Iterator<T>>(iter: Iter) -> BinaryHeap<T> {
648642
BinaryHeap::from_vec(iter.collect())
649643
}
650644
}
651645

652646
#[stable]
653647
impl<T: Ord> Extend<T> for BinaryHeap<T> {
654-
fn extend<Iter: Iterator<Item=T>>(&mut self, mut iter: Iter) {
648+
fn extend<Iter: Iterator<T>>(&mut self, mut iter: Iter) {
655649
let (lower, _) = iter.size_hint();
656650

657651
self.reserve(lower);

branches/batch/src/libcollections/bit.rs

Lines changed: 14 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ pub struct Bitv {
164164
nbits: uint
165165
}
166166

167-
// NOTE(stage0): remove impl after a snapshot
168-
#[cfg(stage0)]
169167
// FIXME(Gankro): NopeNopeNopeNopeNope (wait for IndexGet to be a thing)
170168
impl Index<uint,bool> for Bitv {
171169
#[inline]
@@ -178,21 +176,6 @@ impl Index<uint,bool> for Bitv {
178176
}
179177
}
180178

181-
#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
182-
// FIXME(Gankro): NopeNopeNopeNopeNope (wait for IndexGet to be a thing)
183-
impl Index<uint> for Bitv {
184-
type Output = bool;
185-
186-
#[inline]
187-
fn index(&self, i: &uint) -> &bool {
188-
if self.get(*i).expect("index out of bounds") {
189-
&TRUE
190-
} else {
191-
&FALSE
192-
}
193-
}
194-
}
195-
196179
/// Computes how many blocks are needed to store that many bits
197180
fn blocks_for_bits(bits: uint) -> uint {
198181
// If we want 17 bits, dividing by 32 will produce 0. So we add 1 to make sure we
@@ -955,7 +938,7 @@ impl Default for Bitv {
955938

956939
#[stable]
957940
impl FromIterator<bool> for Bitv {
958-
fn from_iter<I:Iterator<Item=bool>>(iterator: I) -> Bitv {
941+
fn from_iter<I:Iterator<bool>>(iterator: I) -> Bitv {
959942
let mut ret = Bitv::new();
960943
ret.extend(iterator);
961944
ret
@@ -965,7 +948,7 @@ impl FromIterator<bool> for Bitv {
965948
#[stable]
966949
impl Extend<bool> for Bitv {
967950
#[inline]
968-
fn extend<I: Iterator<Item=bool>>(&mut self, mut iterator: I) {
951+
fn extend<I: Iterator<bool>>(&mut self, mut iterator: I) {
969952
let (min, _) = iterator.size_hint();
970953
self.reserve(min);
971954
for element in iterator {
@@ -1048,9 +1031,7 @@ pub struct Iter<'a> {
10481031
}
10491032

10501033
#[stable]
1051-
impl<'a> Iterator for Iter<'a> {
1052-
type Item = bool;
1053-
1034+
impl<'a> Iterator<bool> for Iter<'a> {
10541035
#[inline]
10551036
fn next(&mut self) -> Option<bool> {
10561037
if self.next_idx != self.end_idx {
@@ -1069,7 +1050,7 @@ impl<'a> Iterator for Iter<'a> {
10691050
}
10701051

10711052
#[stable]
1072-
impl<'a> DoubleEndedIterator for Iter<'a> {
1053+
impl<'a> DoubleEndedIterator<bool> for Iter<'a> {
10731054
#[inline]
10741055
fn next_back(&mut self) -> Option<bool> {
10751056
if self.next_idx != self.end_idx {
@@ -1082,10 +1063,10 @@ impl<'a> DoubleEndedIterator for Iter<'a> {
10821063
}
10831064

10841065
#[stable]
1085-
impl<'a> ExactSizeIterator for Iter<'a> {}
1066+
impl<'a> ExactSizeIterator<bool> for Iter<'a> {}
10861067

10871068
#[stable]
1088-
impl<'a> RandomAccessIterator for Iter<'a> {
1069+
impl<'a> RandomAccessIterator<bool> for Iter<'a> {
10891070
#[inline]
10901071
fn indexable(&self) -> uint {
10911072
self.end_idx - self.next_idx
@@ -1153,7 +1134,7 @@ impl Default for BitvSet {
11531134

11541135
#[stable]
11551136
impl FromIterator<uint> for BitvSet {
1156-
fn from_iter<I:Iterator<Item=uint>>(iterator: I) -> BitvSet {
1137+
fn from_iter<I:Iterator<uint>>(iterator: I) -> BitvSet {
11571138
let mut ret = BitvSet::new();
11581139
ret.extend(iterator);
11591140
ret
@@ -1163,7 +1144,7 @@ impl FromIterator<uint> for BitvSet {
11631144
#[stable]
11641145
impl Extend<uint> for BitvSet {
11651146
#[inline]
1166-
fn extend<I: Iterator<Item=uint>>(&mut self, mut iterator: I) {
1147+
fn extend<I: Iterator<uint>>(&mut self, mut iterator: I) {
11671148
for i in iterator {
11681149
self.insert(i);
11691150
}
@@ -1811,9 +1792,7 @@ pub struct Difference<'a>(TwoBitPositions<'a>);
18111792
pub struct SymmetricDifference<'a>(TwoBitPositions<'a>);
18121793

18131794
#[stable]
1814-
impl<'a> Iterator for SetIter<'a> {
1815-
type Item = uint;
1816-
1795+
impl<'a> Iterator<uint> for SetIter<'a> {
18171796
fn next(&mut self) -> Option<uint> {
18181797
while self.next_idx < self.set.bitv.len() {
18191798
let idx = self.next_idx;
@@ -1834,9 +1813,7 @@ impl<'a> Iterator for SetIter<'a> {
18341813
}
18351814

18361815
#[stable]
1837-
impl<'a> Iterator for TwoBitPositions<'a> {
1838-
type Item = uint;
1839-
1816+
impl<'a> Iterator<uint> for TwoBitPositions<'a> {
18401817
fn next(&mut self) -> Option<uint> {
18411818
while self.next_idx < self.set.bitv.len() ||
18421819
self.next_idx < self.other.bitv.len() {
@@ -1872,33 +1849,25 @@ impl<'a> Iterator for TwoBitPositions<'a> {
18721849
}
18731850

18741851
#[stable]
1875-
impl<'a> Iterator for Union<'a> {
1876-
type Item = uint;
1877-
1852+
impl<'a> Iterator<uint> for Union<'a> {
18781853
#[inline] fn next(&mut self) -> Option<uint> { self.0.next() }
18791854
#[inline] fn size_hint(&self) -> (uint, Option<uint>) { self.0.size_hint() }
18801855
}
18811856

18821857
#[stable]
1883-
impl<'a> Iterator for Intersection<'a> {
1884-
type Item = uint;
1885-
1858+
impl<'a> Iterator<uint> for Intersection<'a> {
18861859
#[inline] fn next(&mut self) -> Option<uint> { self.0.next() }
18871860
#[inline] fn size_hint(&self) -> (uint, Option<uint>) { self.0.size_hint() }
18881861
}
18891862

18901863
#[stable]
1891-
impl<'a> Iterator for Difference<'a> {
1892-
type Item = uint;
1893-
1864+
impl<'a> Iterator<uint> for Difference<'a> {
18941865
#[inline] fn next(&mut self) -> Option<uint> { self.0.next() }
18951866
#[inline] fn size_hint(&self) -> (uint, Option<uint>) { self.0.size_hint() }
18961867
}
18971868

18981869
#[stable]
1899-
impl<'a> Iterator for SymmetricDifference<'a> {
1900-
type Item = uint;
1901-
1870+
impl<'a> Iterator<uint> for SymmetricDifference<'a> {
19021871
#[inline] fn next(&mut self) -> Option<uint> { self.0.next() }
19031872
#[inline] fn size_hint(&self) -> (uint, Option<uint>) { self.0.size_hint() }
19041873
}

0 commit comments

Comments
 (0)