1
Fork 0

do not suggest a semicolon for a macro without !

This commit is contained in:
Takayuki Maeda 2022-09-07 03:59:47 +09:00
parent b44197abb0
commit 7ac124803f
8 changed files with 16 additions and 2 deletions

View file

@ -1977,6 +1977,9 @@ impl<'a> Parser<'a> {
open_delim_span: Span,
) -> PResult<'a, ()> {
if self.token.kind == token::Comma {
if !self.sess.source_map().is_multiline(prev_span.until(self.token.span)) {
return Ok(());
}
let mut snapshot = self.create_snapshot_for_diagnostic();
snapshot.bump();
match snapshot.parse_seq_to_before_end(