about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-02-02 10:56:55 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-02-02 10:56:55 -0800
commit9529ab0e7e469940db890604060c073179db8464 (patch)
treeba8b6878fdc2b35faaa3a970e978820dca950db7 /src/libsyntax/parse/parser.rs
parent8c468b69aed6c85ca4c15e178ade44633acedce6 (diff)
parent9683745fed09daf7f8acc55d679b41d3bc660ec4 (diff)
downloadrust-9529ab0e7e469940db890604060c073179db8464.tar.gz
rust-9529ab0e7e469940db890604060c073179db8464.zip
rollup merge of #21710: alfie/libsyntax
Conflicts:
	src/libsyntax/parse/parser.rs
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 66f5cdfd1e3..49df6a361c5 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -746,7 +746,7 @@ impl<'a> Parser<'a> {
         // would encounter a `>` and stop. This lets the parser handle trailing
         // commas in generic parameters, because it can stop either after
         // parsing a type or after parsing a comma.
-        for i in iter::count(0us, 1) {
+        for i in iter::count(0, 1) {
             if self.check(&token::Gt)
                 || self.token == token::BinOp(token::Shr)
                 || self.token == token::Ge
@@ -923,7 +923,7 @@ impl<'a> Parser<'a> {
         };
         self.span = next.sp;
         self.token = next.tok;
-        self.tokens_consumed += 1us;
+        self.tokens_consumed += 1;
         self.expected_tokens.clear();
         // check after each token
         self.check_unknown_macro_variable();
@@ -2632,7 +2632,7 @@ impl<'a> Parser<'a> {
     }
 
     pub fn check_unknown_macro_variable(&mut self) {
-        if self.quote_depth == 0us {
+        if self.quote_depth == 0 {
             match self.token {
                 token::SubstNt(name, _) =>
                     self.fatal(&format!("unknown macro variable `{}`",
@@ -2701,7 +2701,7 @@ impl<'a> Parser<'a> {
                                     token_str)[])
                 },
                 /* we ought to allow different depths of unquotation */
-                token::Dollar | token::SubstNt(..) if p.quote_depth > 0us => {
+                token::Dollar | token::SubstNt(..) if p.quote_depth > 0 => {
                     p.parse_unquoted()
                 }
                 _ => {
@@ -5638,7 +5638,7 @@ impl<'a> Parser<'a> {
             return Ok(item);
         }
         if self.check_keyword(keywords::Unsafe) &&
-            self.look_ahead(1us, |t| t.is_keyword(keywords::Trait))
+            self.look_ahead(1, |t| t.is_keyword(keywords::Trait))
         {
             // UNSAFE TRAIT ITEM
             self.expect_keyword(keywords::Unsafe);
@@ -5655,7 +5655,7 @@ impl<'a> Parser<'a> {
             return Ok(item);
         }
         if self.check_keyword(keywords::Unsafe) &&
-            self.look_ahead(1us, |t| t.is_keyword(keywords::Impl))
+            self.look_ahead(1, |t| t.is_keyword(keywords::Impl))
         {
             // IMPL ITEM
             self.expect_keyword(keywords::Unsafe);
@@ -5685,7 +5685,7 @@ impl<'a> Parser<'a> {
             return Ok(item);
         }
         if self.check_keyword(keywords::Unsafe)
-            && self.look_ahead(1us, |t| *t != token::OpenDelim(token::Brace)) {
+            && self.look_ahead(1, |t| *t != token::OpenDelim(token::Brace)) {
             // UNSAFE FUNCTION ITEM
             self.bump();
             let abi = if self.eat_keyword(keywords::Extern) {
@@ -5963,7 +5963,7 @@ impl<'a> Parser<'a> {
                 }
             }
         }
-        let mut rename_to = path[path.len() - 1us];
+        let mut rename_to = path[path.len() - 1];
         let path = ast::Path {
             span: mk_sp(lo, self.last_span.hi),
             global: false,