Fix internal compiler error on malformed match arm pattern.
Issue: 54379
This commit is contained in:
parent
987a50bab3
commit
b7248d5988
3 changed files with 48 additions and 0 deletions
|
@ -3866,6 +3866,9 @@ impl<'a> Parser<'a> {
|
|||
// check that a comma comes after every field
|
||||
if !ate_comma {
|
||||
let err = self.struct_span_err(self.prev_span, "expected `,`");
|
||||
if let Some(mut delayed) = delayed_err {
|
||||
delayed.emit();
|
||||
}
|
||||
return Err(err);
|
||||
}
|
||||
ate_comma = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue