Account for missing .
in macros to avoid incorrect suggestion
This commit is contained in:
parent
1ce0fa98c7
commit
cbbc7becc8
2 changed files with 4 additions and 4 deletions
|
@ -763,6 +763,10 @@ impl<'a> Parser<'a> {
|
|||
} else {
|
||||
return;
|
||||
}
|
||||
if self.token.span == self.prev_token.span {
|
||||
// Account for syntax errors in proc-macros.
|
||||
return;
|
||||
}
|
||||
if self.look_ahead(1, |t| [token::Semi, token::Question, token::Dot].contains(&t.kind)) {
|
||||
err.span_suggestion_verbose(
|
||||
self.prev_token.span.between(self.token.span),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue