1
Fork 0

Do not suggest adding ; when , is also a choice

This commit is contained in:
Michael Goulet 2022-07-02 03:04:18 +00:00
parent e55c53c57e
commit 9d5c74e16a
5 changed files with 23 additions and 13 deletions

View file

@ -560,7 +560,8 @@ impl<'a> Parser<'a> {
|| (sm.is_multiline(
self.prev_token.span.shrink_to_hi().until(self.token.span.shrink_to_lo())
) && t == &token::Pound)
}) {
}) && !expected.contains(&TokenType::Token(token::Comma))
{
// Missing semicolon typo. This is triggered if the next token could either start a
// new statement or is a block close. For example:
//