about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorJohn Clements <clements@racket-lang.org>2013-04-19 09:45:02 -0700
committerJohn Clements <clements@racket-lang.org>2013-04-28 09:51:15 -0700
commitb82724db22673d08b5af85ce13568dc761fe7b59 (patch)
tree20af4ccef2a8cc999e620f974448dbe195157a54 /src/libsyntax/parse/parser.rs
parent703390150a75abbe6fbacd6b6e3ae08c9a6f5e37 (diff)
downloadrust-b82724db22673d08b5af85ce13568dc761fe7b59.tar.gz
rust-b82724db22673d08b5af85ce13568dc761fe7b59.zip
needs_comma was always true
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 1ec7c91121d..880c431e15c 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3807,7 +3807,7 @@ pub impl Parser {
 
             let vis = self.parse_visibility();
 
-            let ident, needs_comma, kind;
+            let ident, kind;
             let mut args = ~[], disr_expr = None;
             ident = self.parse_ident();
             if self.eat(&token::LBRACE) {
@@ -3836,7 +3836,6 @@ pub impl Parser {
             } else {
                 kind = tuple_variant_kind(~[]);
             }
-            needs_comma = true;
 
             let vr = ast::variant_ {
                 name: ident,
@@ -3848,7 +3847,7 @@ pub impl Parser {
             };
             variants.push(spanned(vlo, self.last_span.hi, vr));
 
-            if needs_comma && !self.eat(&token::COMMA) { break; }
+            if !self.eat(&token::COMMA) { break; }
         }
         self.expect(&token::RBRACE);
         if (have_disr && !all_nullary) {