diff options
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/lexer/mod.rs | 10 | ||||
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/parse/token.rs | 12 |
3 files changed, 13 insertions, 13 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index 99be1b11b11..493a97c24cf 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -52,7 +52,7 @@ pub trait Reader { } } -#[derive(Clone, PartialEq, Eq, Show)] +#[derive(Clone, PartialEq, Eq, Debug)] pub struct TokenAndSpan { pub tok: token::Token, pub sp: Span, @@ -732,7 +732,7 @@ impl<'a> StringReader<'a> { let start_bpos = self.last_pos; let mut accum_int = 0; - for _ in range(0, n_digits) { + for _ in 0..n_digits { if self.is_eof() { let last_bpos = self.last_pos; self.fatal_span_(start_bpos, last_bpos, "unterminated numeric character escape"); @@ -1217,7 +1217,7 @@ impl<'a> StringReader<'a> { } //if self.curr_is('"') { //content_end_bpos = self.last_pos; - //for _ in range(0, hash_count) { + //for _ in 0..hash_count { //self.bump(); //if !self.curr_is('#') { //continue 'outer; @@ -1225,7 +1225,7 @@ impl<'a> StringReader<'a> { match c { '"' => { content_end_bpos = self.last_pos; - for _ in range(0, hash_count) { + for _ in 0..hash_count { self.bump(); if !self.curr_is('#') { continue 'outer; @@ -1402,7 +1402,7 @@ impl<'a> StringReader<'a> { }, Some('"') => { content_end_bpos = self.last_pos; - for _ in range(0, hash_count) { + for _ in 0..hash_count { self.bump(); if !self.curr_is('#') { continue 'outer; diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 0be7b605e57..1c146968fd5 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -472,7 +472,7 @@ pub fn str_lit(lit: &str) -> String { } else { // otherwise, a normal escape let (c, n) = char_lit(&lit[i..]); - for _ in range(0, n - 1) { // we don't need to move past the first \ + for _ in 0..n - 1 { // we don't need to move past the first \ chars.next(); } res.push(c); @@ -635,7 +635,7 @@ pub fn binary_lit(lit: &str) -> Rc<Vec<u8>> { // otherwise, a normal escape let (c, n) = byte_lit(&lit[i..]); // we don't need to move past the first \ - for _ in range(0, n - 1) { + for _ in 0..n - 1 { chars.next(); } res.push(c); diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index ac694afac6b..1ef33a2401e 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -29,7 +29,7 @@ use std::path::BytesContainer; use std::rc::Rc; #[allow(non_camel_case_types)] -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug, Copy)] pub enum BinOpToken { Plus, Minus, @@ -44,7 +44,7 @@ pub enum BinOpToken { } /// A delimiter token -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug, Copy)] pub enum DelimToken { /// A round parenthesis: `(` or `)` Paren, @@ -54,14 +54,14 @@ pub enum DelimToken { Brace, } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug, Copy)] pub enum IdentStyle { /// `::` follows the identifier with no whitespace in-between. ModName, Plain, } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug, Copy)] pub enum SpecialMacroVar { /// `$crate` will be filled in with the name of the crate a macro was /// imported from, if any. @@ -76,7 +76,7 @@ impl SpecialMacroVar { } } -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug, Copy)] pub enum Lit { Byte(ast::Name), Char(ast::Name), @@ -102,7 +102,7 @@ impl Lit { } #[allow(non_camel_case_types)] -#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show)] +#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Debug)] pub enum Token { /* Expression-operator symbols. */ Eq, |
