about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-12-30 15:34:28 -0800
committerPatrick Walton <pcwalton@mimiga.net>2014-01-02 14:16:08 -0800
commit4ee95cf96c8e4d30b8d0dfa83f58d050cae10fae (patch)
tree5587f535860638b644688e7958669c68b040ab1b /src/libsyntax/parse/parser.rs
parent6992a5c77d948a5600f719387786c51d36fdcd0a (diff)
downloadrust-4ee95cf96c8e4d30b8d0dfa83f58d050cae10fae.tar.gz
rust-4ee95cf96c8e4d30b8d0dfa83f58d050cae10fae.zip
libsyntax: De-`@mut` `Parser::restriction`
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index c7f0996dfc6..749000d00d2 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -314,7 +314,7 @@ pub fn Parser(sess: @mut ParseSess, cfg: ast::CrateConfig, rdr: @mut reader)
         buffer_start: 0,
         buffer_end: 0,
         tokens_consumed: 0,
-        restriction: @mut UNRESTRICTED,
+        restriction: UNRESTRICTED,
         quote_depth: 0,
         obsolete_set: @mut HashSet::new(),
         mod_path_stack: @mut ~[],
@@ -339,7 +339,7 @@ pub struct Parser {
     buffer_start: int,
     buffer_end: int,
     tokens_consumed: uint,
-    restriction: @mut restriction,
+    restriction: restriction,
     quote_depth: uint, // not (yet) related to the quasiquoter
     reader: @mut reader,
     interner: @token::ident_interner,
@@ -2356,7 +2356,7 @@ impl Parser {
         // scope of the borrows.
         {
             let token: &token::Token = &self.token;
-            let restriction: &restriction = self.restriction;
+            let restriction: &restriction = &self.restriction;
             match (token, restriction) {
                 (&token::BINOP(token::OR), &RESTRICT_NO_BAR_OP) => return lhs,
                 (&token::BINOP(token::OR),
@@ -2700,10 +2700,10 @@ impl Parser {
 
     // parse an expression, subject to the given restriction
     fn parse_expr_res(&mut self, r: restriction) -> @Expr {
-        let old = *self.restriction;
-        *self.restriction = r;
+        let old = self.restriction;
+        self.restriction = r;
         let e = self.parse_assign_expr();
-        *self.restriction = old;
+        self.restriction = old;
         return e;
     }
 
@@ -3310,7 +3310,7 @@ impl Parser {
 
     // is this expression a successfully-parsed statement?
     fn expr_is_complete(&mut self, e: @Expr) -> bool {
-        return *self.restriction == RESTRICT_STMT_EXPR &&
+        return self.restriction == RESTRICT_STMT_EXPR &&
             !classify::expr_requires_semi_to_be_stmt(e);
     }