提交 b82724db 编写于 作者: J John Clements

needs_comma was always true

上级 70339015
......@@ -3807,7 +3807,7 @@ fn parse_enum_def(&self, _generics: &ast::Generics) -> enum_def {
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 @@ fn parse_enum_def(&self, _generics: &ast::Generics) -> enum_def {
} else {
kind = tuple_variant_kind(~[]);
}
needs_comma = true;
let vr = ast::variant_ {
name: ident,
......@@ -3848,7 +3847,7 @@ fn parse_enum_def(&self, _generics: &ast::Generics) -> enum_def {
};
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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册