needs_comma was always true
This commit is contained in:
parent
703390150a
commit
b82724db22
1 changed files with 2 additions and 3 deletions
|
@ -3807,7 +3807,7 @@ pub impl Parser {
|
||||||
|
|
||||||
let vis = self.parse_visibility();
|
let vis = self.parse_visibility();
|
||||||
|
|
||||||
let ident, needs_comma, kind;
|
let ident, kind;
|
||||||
let mut args = ~[], disr_expr = None;
|
let mut args = ~[], disr_expr = None;
|
||||||
ident = self.parse_ident();
|
ident = self.parse_ident();
|
||||||
if self.eat(&token::LBRACE) {
|
if self.eat(&token::LBRACE) {
|
||||||
|
@ -3836,7 +3836,6 @@ pub impl Parser {
|
||||||
} else {
|
} else {
|
||||||
kind = tuple_variant_kind(~[]);
|
kind = tuple_variant_kind(~[]);
|
||||||
}
|
}
|
||||||
needs_comma = true;
|
|
||||||
|
|
||||||
let vr = ast::variant_ {
|
let vr = ast::variant_ {
|
||||||
name: ident,
|
name: ident,
|
||||||
|
@ -3848,7 +3847,7 @@ pub impl Parser {
|
||||||
};
|
};
|
||||||
variants.push(spanned(vlo, self.last_span.hi, vr));
|
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);
|
self.expect(&token::RBRACE);
|
||||||
if (have_disr && !all_nullary) {
|
if (have_disr && !all_nullary) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue