Skip to content

Commit

Permalink
Simplify check
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Mar 17, 2019
1 parent 1aa43af commit 0a09e76
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7713,11 +7713,7 @@ impl<'a> Parser<'a> {
variants.push(respan(vlo.to(self.prev_span), vr));

if !self.eat(&token::Comma) {
if self.token.is_ident() &&
!self.token.is_special_ident() &&
!self.token.is_used_keyword() &&
!self.token.is_unused_keyword()
{
if self.token.is_ident() && !self.token.is_reserved_ident() {
let sp = self.sess.source_map().next_point(self.prev_span);
let mut err = self.struct_span_err(sp, "missing comma");
err.span_suggestion_short(
Expand Down

0 comments on commit 0a09e76

Please sign in to comment.