summary refs log tree commit diff
path: root/src/comp/front
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2011-05-31 10:58:30 -0700
committerGraydon Hoare <graydon@mozilla.com>2011-05-31 11:00:47 -0700
commitb6971d94dfa67f4e0ce81c2cd70af6f8b1dad8fa (patch)
treed7828372428a6dd64f22d147cbafee4cd253fe50 /src/comp/front
parent55e3cd41de71a35512bee745b4ababd8c007ac07 (diff)
downloadrust-b6971d94dfa67f4e0ce81c2cd70af6f8b1dad8fa.tar.gz
rust-b6971d94dfa67f4e0ce81c2cd70af6f8b1dad8fa.zip
Consolidate formatting functions a bit more.
Diffstat (limited to 'src/comp/front')
-rw-r--r--src/comp/front/parser.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs
index a6d8560ee67..a8da7294928 100644
--- a/src/comp/front/parser.rs
+++ b/src/comp/front/parser.rs
@@ -1597,7 +1597,7 @@ fn stmt_to_expr(@ast::stmt stmt) -> option::t[@ast::expr] {
     ret none[@ast::expr];
 }
 
-fn stmt_ends_with_semi(@ast::stmt stmt) -> bool {
+fn stmt_ends_with_semi(&ast::stmt stmt) -> bool {
     alt (stmt.node) {
         case (ast::stmt_decl(?d,_)) {
             alt (d.node) {
@@ -1675,7 +1675,7 @@ fn parse_block(&parser p) -> ast::block {
                             }
                             case (token::RBRACE) { expr = some(e); }
                             case (?t) {
-                                if (stmt_ends_with_semi(stmt)) {
+                                if (stmt_ends_with_semi(*stmt)) {
                                     p.err("expected ';' or '}' after " +
                                           "expression but found " +
                                           token::to_str(p.get_reader(), t));
@@ -1692,7 +1692,7 @@ fn parse_block(&parser p) -> ast::block {
                         // used in branches and binary expressions in rustboot
                         // means we cannot use && here. I know, right?
                         if (p.get_file_type() == SOURCE_FILE) {
-                            if (stmt_ends_with_semi(stmt)) {
+                            if (stmt_ends_with_semi(*stmt)) {
                                 expect(p, token::SEMI);
                             }
                         }