Fix regression
This commit is contained in:
parent
3e22e0c3bc
commit
54858d5a67
3 changed files with 5 additions and 3 deletions
|
@ -6307,7 +6307,7 @@ impl<'a> Parser<'a> {
|
|||
if !self.eat(term) {
|
||||
let token_str = self.this_token_descr();
|
||||
let mut err = self.fatal(&format!("expected item, found {}", token_str));
|
||||
if token_str == ";" {
|
||||
if self.token == token::Semi {
|
||||
let msg = "consider removing this semicolon";
|
||||
err.span_suggestion_short_with_applicability(
|
||||
self.span, msg, String::new(), Applicability::MachineApplicable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue