Skip to content

Commit a11cf1a

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 167868 b: refs/heads/master c: 6b19a02 h: refs/heads/master v: v3
1 parent 377790e commit a11cf1a

File tree

7 files changed

+20
-12
lines changed

7 files changed

+20
-12
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 6bff9de8eaa511807e9d6a323d57591b6d2ddcc6
2+
refs/heads/master: 6b19a02080b816d0f416872e63f9b2dd90165c0f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: c89417130f042c58adc60012e7cddc4ef70b70b9
55
refs/heads/try: 5204084bd2e46af7cc6e0147430e44dd0d657bbb

trunk/src/libsyntax/ast_map/mod.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ struct LinkedPathNode<'a> {
6161

6262
type LinkedPath<'a> = Option<&'a LinkedPathNode<'a>>;
6363

64-
impl<'a> Iterator<PathElem> for LinkedPath<'a> {
64+
impl<'a> Iterator for LinkedPath<'a> {
65+
type Item = PathElem;
66+
6567
fn next(&mut self) -> Option<PathElem> {
6668
match *self {
6769
Some(node) => {
@@ -77,7 +79,9 @@ impl<'a> Iterator<PathElem> for LinkedPath<'a> {
7779
#[deriving(Clone)]
7880
pub struct Values<'a, T:'a>(pub slice::Iter<'a, T>);
7981

80-
impl<'a, T: Copy> Iterator<T> for Values<'a, T> {
82+
impl<'a, T: Copy> Iterator for Values<'a, T> {
83+
type Item = T;
84+
8185
fn next(&mut self) -> Option<T> {
8286
let &Values(ref mut items) = self;
8387
items.next().map(|&x| x)
@@ -87,7 +91,7 @@ impl<'a, T: Copy> Iterator<T> for Values<'a, T> {
8791
/// The type of the iterator used by with_path.
8892
pub type PathElems<'a, 'b> = iter::Chain<Values<'a, PathElem>, LinkedPath<'b>>;
8993

90-
pub fn path_to_string<PI: Iterator<PathElem>>(path: PI) -> String {
94+
pub fn path_to_string<PI: Iterator<Item=PathElem>>(path: PI) -> String {
9195
let itr = token::get_ident_interner();
9296

9397
path.fold(String::new(), |mut s, e| {
@@ -629,7 +633,9 @@ impl<'a, 'ast> NodesMatchingSuffix<'a, 'ast> {
629633
}
630634
}
631635

632-
impl<'a, 'ast> Iterator<NodeId> for NodesMatchingSuffix<'a, 'ast> {
636+
impl<'a, 'ast> Iterator for NodesMatchingSuffix<'a, 'ast> {
637+
type Item = NodeId;
638+
633639
fn next(&mut self) -> Option<NodeId> {
634640
loop {
635641
let idx = self.idx;

trunk/src/libsyntax/attr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ pub enum StabilityLevel {
359359

360360
pub fn find_stability_generic<'a,
361361
AM: AttrMetaMethods,
362-
I: Iterator<&'a AM>>
362+
I: Iterator<Item=&'a AM>>
363363
(mut attrs: I)
364364
-> Option<(Stability, &'a AM)> {
365365
for attr in attrs {

trunk/src/libsyntax/ext/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ pub struct MacItems {
220220
}
221221

222222
impl MacItems {
223-
pub fn new<I: Iterator<P<ast::Item>>>(it: I) -> Box<MacResult+'static> {
223+
pub fn new<I: Iterator<Item=P<ast::Item>>>(it: I) -> Box<MacResult+'static> {
224224
box MacItems { items: it.collect() } as Box<MacResult+'static>
225225
}
226226
}

trunk/src/libsyntax/owned_slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl<T: Clone> Clone for OwnedSlice<T> {
7777
}
7878

7979
impl<T> FromIterator<T> for OwnedSlice<T> {
80-
fn from_iter<I: Iterator<T>>(iter: I) -> OwnedSlice<T> {
80+
fn from_iter<I: Iterator<Item=T>>(iter: I) -> OwnedSlice<T> {
8181
OwnedSlice::from_vec(iter.collect())
8282
}
8383
}

trunk/src/libsyntax/parse/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ pub fn binary_lit(lit: &str) -> Rc<Vec<u8>> {
598598
let error = |&: i| format!("lexer should have rejected {} at {}", lit, i);
599599

600600
/// Eat everything up to a non-whitespace
601-
fn eat<'a, I: Iterator<(uint, u8)>>(it: &mut iter::Peekable<(uint, u8), I>) {
601+
fn eat<'a, I: Iterator<Item=(uint, u8)>>(it: &mut iter::Peekable<(uint, u8), I>) {
602602
loop {
603603
match it.peek().map(|x| x.1) {
604604
Some(b' ') | Some(b'\n') | Some(b'\r') | Some(b'\t') => {

trunk/src/libsyntax/util/small_vector.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ enum SmallVectorRepr<T> {
3030
}
3131

3232
impl<T> FromIterator<T> for SmallVector<T> {
33-
fn from_iter<I: Iterator<T>>(iter: I) -> SmallVector<T> {
33+
fn from_iter<I: Iterator<Item=T>>(iter: I) -> SmallVector<T> {
3434
let mut v = SmallVector::zero();
3535
v.extend(iter);
3636
v
3737
}
3838
}
3939

4040
impl<T> Extend<T> for SmallVector<T> {
41-
fn extend<I: Iterator<T>>(&mut self, mut iter: I) {
41+
fn extend<I: Iterator<Item=T>>(&mut self, mut iter: I) {
4242
for val in iter {
4343
self.push(val);
4444
}
@@ -147,7 +147,9 @@ enum IntoIterRepr<T> {
147147
ManyIterator(vec::IntoIter<T>),
148148
}
149149

150-
impl<T> Iterator<T> for IntoIter<T> {
150+
impl<T> Iterator for IntoIter<T> {
151+
type Item = T;
152+
151153
fn next(&mut self) -> Option<T> {
152154
match self.repr {
153155
ZeroIterator => None,

0 commit comments

Comments
 (0)