Skip to content

Commit 240c1db

Browse files
committed
Merge pull request #105 from kui/fix-iterator-type-arg
Fix compilation error for assoc types in the Iterator traits
2 parents 389d84c + 4da140f commit 240c1db

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![feature(macro_rules)]
22
#![feature(phase)]
3+
#![feature(associated_types)]
34
#[phase(plugin, link)] extern crate log;
45

56
extern crate syntax;

src/racer/codecleaner.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ pub struct CodeIndicesIter<'a> {
3535
state: State
3636
}
3737

38-
impl<'a> Iterator<(uint, uint)> for CodeIndicesIter<'a> {
38+
impl<'a> Iterator for CodeIndicesIter<'a> {
39+
type Item = (uint, uint);
40+
3941
#[inline]
4042
fn next(&mut self) -> Option<(uint, uint)> {
4143
return match self.state {

src/racer/codeiter.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ pub struct StmtIndicesIter<'a> {
1919
enddelim: u8
2020
}
2121

22-
impl<'a> Iterator<(uint, uint)> for StmtIndicesIter<'a> {
22+
impl<'a> Iterator for StmtIndicesIter<'a> {
23+
type Item = (uint, uint);
24+
2325
#[inline]
2426
fn next(&mut self) -> Option<(uint, uint)> {
2527
let semicolon: u8 = ";".as_bytes()[0];

0 commit comments

Comments
 (0)