syntax: fix fallout
This commit is contained in:
parent
6bff9de8ea
commit
6b19a02080
@ -61,7 +61,9 @@ struct LinkedPathNode<'a> {
|
||||
|
||||
type LinkedPath<'a> = Option<&'a LinkedPathNode<'a>>;
|
||||
|
||||
impl<'a> Iterator<PathElem> for LinkedPath<'a> {
|
||||
impl<'a> Iterator for LinkedPath<'a> {
|
||||
type Item = PathElem;
|
||||
|
||||
fn next(&mut self) -> Option<PathElem> {
|
||||
match *self {
|
||||
Some(node) => {
|
||||
@ -77,7 +79,9 @@ fn next(&mut self) -> Option<PathElem> {
|
||||
#[deriving(Clone)]
|
||||
pub struct Values<'a, T:'a>(pub slice::Iter<'a, T>);
|
||||
|
||||
impl<'a, T: Copy> Iterator<T> for Values<'a, T> {
|
||||
impl<'a, T: Copy> Iterator for Values<'a, T> {
|
||||
type Item = T;
|
||||
|
||||
fn next(&mut self) -> Option<T> {
|
||||
let &Values(ref mut items) = self;
|
||||
items.next().map(|&x| x)
|
||||
@ -87,7 +91,7 @@ fn next(&mut self) -> Option<T> {
|
||||
/// The type of the iterator used by with_path.
|
||||
pub type PathElems<'a, 'b> = iter::Chain<Values<'a, PathElem>, LinkedPath<'b>>;
|
||||
|
||||
pub fn path_to_string<PI: Iterator<PathElem>>(path: PI) -> String {
|
||||
pub fn path_to_string<PI: Iterator<Item=PathElem>>(path: PI) -> String {
|
||||
let itr = token::get_ident_interner();
|
||||
|
||||
path.fold(String::new(), |mut s, e| {
|
||||
@ -629,7 +633,9 @@ fn matches_names(&self, parent_of_n: NodeId, name: Name) -> bool {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, 'ast> Iterator<NodeId> for NodesMatchingSuffix<'a, 'ast> {
|
||||
impl<'a, 'ast> Iterator for NodesMatchingSuffix<'a, 'ast> {
|
||||
type Item = NodeId;
|
||||
|
||||
fn next(&mut self) -> Option<NodeId> {
|
||||
loop {
|
||||
let idx = self.idx;
|
||||
|
@ -359,7 +359,7 @@ pub enum StabilityLevel {
|
||||
|
||||
pub fn find_stability_generic<'a,
|
||||
AM: AttrMetaMethods,
|
||||
I: Iterator<&'a AM>>
|
||||
I: Iterator<Item=&'a AM>>
|
||||
(mut attrs: I)
|
||||
-> Option<(Stability, &'a AM)> {
|
||||
for attr in attrs {
|
||||
|
@ -220,7 +220,7 @@ pub struct MacItems {
|
||||
}
|
||||
|
||||
impl MacItems {
|
||||
pub fn new<I: Iterator<P<ast::Item>>>(it: I) -> Box<MacResult+'static> {
|
||||
pub fn new<I: Iterator<Item=P<ast::Item>>>(it: I) -> Box<MacResult+'static> {
|
||||
box MacItems { items: it.collect() } as Box<MacResult+'static>
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ fn clone(&self) -> OwnedSlice<T> {
|
||||
}
|
||||
|
||||
impl<T> FromIterator<T> for OwnedSlice<T> {
|
||||
fn from_iter<I: Iterator<T>>(iter: I) -> OwnedSlice<T> {
|
||||
fn from_iter<I: Iterator<Item=T>>(iter: I) -> OwnedSlice<T> {
|
||||
OwnedSlice::from_vec(iter.collect())
|
||||
}
|
||||
}
|
||||
|
@ -598,7 +598,7 @@ pub fn binary_lit(lit: &str) -> Rc<Vec<u8>> {
|
||||
let error = |&: i| format!("lexer should have rejected {} at {}", lit, i);
|
||||
|
||||
/// Eat everything up to a non-whitespace
|
||||
fn eat<'a, I: Iterator<(uint, u8)>>(it: &mut iter::Peekable<(uint, u8), I>) {
|
||||
fn eat<'a, I: Iterator<Item=(uint, u8)>>(it: &mut iter::Peekable<(uint, u8), I>) {
|
||||
loop {
|
||||
match it.peek().map(|x| x.1) {
|
||||
Some(b' ') | Some(b'\n') | Some(b'\r') | Some(b'\t') => {
|
||||
|
@ -30,7 +30,7 @@ enum SmallVectorRepr<T> {
|
||||
}
|
||||
|
||||
impl<T> FromIterator<T> for SmallVector<T> {
|
||||
fn from_iter<I: Iterator<T>>(iter: I) -> SmallVector<T> {
|
||||
fn from_iter<I: Iterator<Item=T>>(iter: I) -> SmallVector<T> {
|
||||
let mut v = SmallVector::zero();
|
||||
v.extend(iter);
|
||||
v
|
||||
@ -38,7 +38,7 @@ fn from_iter<I: Iterator<T>>(iter: I) -> SmallVector<T> {
|
||||
}
|
||||
|
||||
impl<T> Extend<T> for SmallVector<T> {
|
||||
fn extend<I: Iterator<T>>(&mut self, mut iter: I) {
|
||||
fn extend<I: Iterator<Item=T>>(&mut self, mut iter: I) {
|
||||
for val in iter {
|
||||
self.push(val);
|
||||
}
|
||||
@ -147,7 +147,9 @@ enum IntoIterRepr<T> {
|
||||
ManyIterator(vec::IntoIter<T>),
|
||||
}
|
||||
|
||||
impl<T> Iterator<T> for IntoIter<T> {
|
||||
impl<T> Iterator for IntoIter<T> {
|
||||
type Item = T;
|
||||
|
||||
fn next(&mut self) -> Option<T> {
|
||||
match self.repr {
|
||||
ZeroIterator => None,
|
||||
|
Loading…
Reference in New Issue
Block a user