about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/comments.rs6
-rw-r--r--src/libsyntax/parse/mod.rs3
-rw-r--r--src/libsyntax/parse/token.rs1
3 files changed, 4 insertions, 6 deletions
diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs
index 54fba29a19a..360ea12ec02 100644
--- a/src/libsyntax/parse/comments.rs
+++ b/src/libsyntax/parse/comments.rs
@@ -19,8 +19,8 @@ use parse::lexer::{is_line_non_doc_comment, is_block_non_doc_comment};
 use parse::lexer;
 use parse::token;
 use parse::token::{get_ident_interner};
-use parse;
 
+use core::iterator::IteratorUtil;
 use core::io;
 use core::str;
 use core::uint;
@@ -78,7 +78,7 @@ pub fn strip_doc_comment_decoration(comment: &str) -> ~str {
             if line.trim().is_empty() {
                 loop;
             }
-            for line.each_chari |j, c| {
+            for line.iter().enumerate().advance |(j, c)| {
                 if j >= i {
                     break;
                 }
@@ -91,7 +91,7 @@ pub fn strip_doc_comment_decoration(comment: &str) -> ~str {
 
         return do lines.map |line| {
             let mut chars = ~[];
-            for str::each_char(*line) |c| { chars.push(c) }
+            for line.iter().advance |c| { chars.push(c) }
             if i > chars.len() {
                 ~""
             } else {
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index d7248204e1c..559bca34f21 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -341,10 +341,9 @@ mod test {
     use codemap::{span, BytePos, spanned};
     use opt_vec;
     use ast;
-    use ast::{new_ident};
     use abi;
     use parse::parser::Parser;
-    use parse::token::{intern, str_to_ident};
+    use parse::token::{str_to_ident};
     use util::parser_testing::{string_to_tts_and_sess, string_to_parser};
     use util::parser_testing::{string_to_expr, string_to_item};
     use util::parser_testing::{string_to_stmt, strs_to_idents};
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index ecf83483c21..7359448a8f2 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -22,7 +22,6 @@ use core::char;
 use core::cmp::Equiv;
 use core::local_data;
 use core::str;
-use core::hashmap::HashSet;
 use core::rand;
 use core::rand::RngUtil;
 use core::to_bytes;