Simplify check
This commit is contained in:
@@ -7713,11 +7713,7 @@ impl<'a> Parser<'a> {
|
|||||||
variants.push(respan(vlo.to(self.prev_span), vr));
|
variants.push(respan(vlo.to(self.prev_span), vr));
|
||||||
|
|
||||||
if !self.eat(&token::Comma) {
|
if !self.eat(&token::Comma) {
|
||||||
if self.token.is_ident() &&
|
if self.token.is_ident() && !self.token.is_reserved_ident() {
|
||||||
!self.token.is_special_ident() &&
|
|
||||||
!self.token.is_used_keyword() &&
|
|
||||||
!self.token.is_unused_keyword()
|
|
||||||
{
|
|
||||||
let sp = self.sess.source_map().next_point(self.prev_span);
|
let sp = self.sess.source_map().next_point(self.prev_span);
|
||||||
let mut err = self.struct_span_err(sp, "missing comma");
|
let mut err = self.struct_span_err(sp, "missing comma");
|
||||||
err.span_suggestion_short(
|
err.span_suggestion_short(
|
||||||
|
|||||||
Reference in New Issue
Block a user