about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-04-12 01:10:31 -0400
committerAlex Crichton <alex@alexcrichton.com>2013-04-20 21:03:24 -0400
commitfd97cac251224e936508541e99fb63ac02fe6eca (patch)
tree2060b9ee3c146637e30843a14ed7b463acdff7fa /src/libsyntax/parse
parent7d317fe7e584832f4aac113d3d5d19d90536c081 (diff)
downloadrust-fd97cac251224e936508541e99fb63ac02fe6eca.tar.gz
rust-fd97cac251224e936508541e99fb63ac02fe6eca.zip
syntax: remove unused 'mut' variables
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/attr.rs8
-rw-r--r--src/libsyntax/parse/comments.rs2
-rw-r--r--src/libsyntax/parse/parser.rs28
3 files changed, 19 insertions, 19 deletions
diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs
index bf8f03d4bf6..f851b9781ab 100644
--- a/src/libsyntax/parse/attr.rs
+++ b/src/libsyntax/parse/attr.rs
@@ -73,7 +73,7 @@ impl parser_attr for Parser {
         self.expect(&token::LBRACKET);
         let meta_item = self.parse_meta_item();
         self.expect(&token::RBRACKET);
-        let mut hi = self.span.hi;
+        let hi = self.span.hi;
         return spanned(lo, hi, ast::attribute_ { style: style,
                                                  value: meta_item,
                                                  is_sugared_doc: false });
@@ -141,16 +141,16 @@ impl parser_attr for Parser {
             token::EQ => {
                 self.bump();
                 let lit = self.parse_lit();
-                let mut hi = self.span.hi;
+                let hi = self.span.hi;
                 @spanned(lo, hi, ast::meta_name_value(name, lit))
             }
             token::LPAREN => {
                 let inner_items = self.parse_meta_seq();
-                let mut hi = self.span.hi;
+                let hi = self.span.hi;
                 @spanned(lo, hi, ast::meta_list(name, inner_items))
             }
             _ => {
-                let mut hi = self.span.hi;
+                let hi = self.span.hi;
                 @spanned(lo, hi, ast::meta_word(name))
             }
         }
diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs
index 2f6bfd4cfc5..b73544e95d6 100644
--- a/src/libsyntax/parse/comments.rs
+++ b/src/libsyntax/parse/comments.rs
@@ -229,7 +229,7 @@ fn read_block_comment(rdr: @mut StringReader,
     debug!(">>> block comment");
     let p = rdr.last_pos;
     let mut lines: ~[~str] = ~[];
-    let mut col: CharPos = rdr.col;
+    let col: CharPos = rdr.col;
     bump(rdr);
     bump(rdr);
 
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index e892f212b05..f164eb06df5 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -810,7 +810,7 @@ pub impl Parser {
     // This version of parse arg doesn't necessarily require
     // identifier names.
     fn parse_arg_general(&self, require_name: bool) -> arg {
-        let mut m;
+        let m;
         let mut is_mutbl = false;
         let pat = if require_name || self.is_named_argument() {
             m = self.parse_arg_mode();
@@ -1154,7 +1154,7 @@ pub impl Parser {
         let lo = self.span.lo;
         let mut hi = self.span.hi;
 
-        let mut ex: expr_;
+        let ex: expr_;
 
         if *self.token == token::LPAREN {
             self.bump();
@@ -1629,9 +1629,9 @@ pub impl Parser {
     // parse a prefix-operator expr
     fn parse_prefix_expr(&self) -> @expr {
         let lo = self.span.lo;
-        let mut hi;
+        let hi;
 
-        let mut ex;
+        let ex;
         match *self.token {
           token::NOT => {
             self.bump();
@@ -1781,7 +1781,7 @@ pub impl Parser {
           token::BINOPEQ(op) => {
               self.bump();
               let rhs = self.parse_expr();
-              let mut aop;
+              let aop;
               match op {
                   token::PLUS => aop = add,
                   token::MINUS => aop = subtract,
@@ -1956,7 +1956,7 @@ pub impl Parser {
         let lo = self.last_span.lo;
         let cond = self.parse_expr();
         let body = self.parse_block_no_value();
-        let mut hi = body.span.hi;
+        let hi = body.span.hi;
         return self.mk_expr(lo, hi, expr_while(cond, body));
     }
 
@@ -1984,7 +1984,7 @@ pub impl Parser {
 
             let lo = self.last_span.lo;
             let body = self.parse_block_no_value();
-            let mut hi = body.span.hi;
+            let hi = body.span.hi;
             return self.mk_expr(lo, hi, expr_loop(body, opt_ident));
         } else {
             // This is a 'continue' expression
@@ -2043,7 +2043,7 @@ pub impl Parser {
 
             arms.push(ast::arm { pats: pats, guard: guard, body: blk });
         }
-        let mut hi = self.span.hi;
+        let hi = self.span.hi;
         self.bump();
         return self.mk_expr(lo, hi, expr_match(discriminant, arms));
     }
@@ -2162,7 +2162,7 @@ pub impl Parser {
             let hi1 = self.last_span.lo;
             let fieldpath = ast_util::ident_to_path(mk_sp(lo1, hi1),
                                                     fieldname);
-            let mut subpat;
+            let subpat;
             if *self.token == token::COLON {
                 self.bump();
                 subpat = self.parse_pat(refutable);
@@ -2183,7 +2183,7 @@ pub impl Parser {
 
         let lo = self.span.lo;
         let mut hi = self.span.hi;
-        let mut pat;
+        let pat;
         match *self.token {
           token::UNDERSCORE => { self.bump(); pat = pat_wild; }
           token::AT => {
@@ -2534,7 +2534,7 @@ pub impl Parser {
             match self.parse_item_or_view_item(/*bad*/ copy item_attrs,
                                                true, false, false) {
               iovi_item(i) => {
-                let mut hi = i.span.hi;
+                let hi = i.span.hi;
                 let decl = @spanned(lo, hi, decl_item(i));
                 return @spanned(lo, hi, stmt_decl(decl, self.get_id()));
               }
@@ -2704,7 +2704,7 @@ pub impl Parser {
                 }
             }
         }
-        let mut hi = self.span.hi;
+        let hi = self.span.hi;
         self.bump();
         let bloc = ast::blk_ {
             view_items: view_items,
@@ -3590,7 +3590,7 @@ pub impl Parser {
         let purity = self.parse_fn_purity();
         let (ident, generics) = self.parse_fn_header();
         let decl = self.parse_fn_decl(|p| p.parse_arg());
-        let mut hi = self.span.hi;
+        let hi = self.span.hi;
         self.expect(&token::SEMI);
         @ast::foreign_item { ident: ident,
                              attrs: attrs,
@@ -3798,7 +3798,7 @@ pub impl Parser {
             }
         }
         self.bump();
-        let mut actual_dtor = do the_dtor.map |dtor| {
+        let actual_dtor = do the_dtor.map |dtor| {
             let (d_body, d_attrs, d_s) = copy *dtor;
             codemap::spanned { node: ast::struct_dtor_ { id: self.get_id(),
                                                      attrs: d_attrs,