Skip to content

Commit 0a09e76

Browse files
committed
Simplify check
1 parent 1aa43af commit 0a09e76

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/libsyntax/parse/parser.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -7713,11 +7713,7 @@ impl<'a> Parser<'a> {
77137713
variants.push(respan(vlo.to(self.prev_span), vr));
77147714

77157715
if !self.eat(&token::Comma) {
7716-
if self.token.is_ident() &&
7717-
!self.token.is_special_ident() &&
7718-
!self.token.is_used_keyword() &&
7719-
!self.token.is_unused_keyword()
7720-
{
7716+
if self.token.is_ident() && !self.token.is_reserved_ident() {
77217717
let sp = self.sess.source_map().next_point(self.prev_span);
77227718
let mut err = self.struct_span_err(sp, "missing comma");
77237719
err.span_suggestion_short(

0 commit comments

Comments
 (0)