Remove semicolon note
Added note that specifies a semicolon should be removed after a given struct
This commit is contained in:
@@ -5486,7 +5486,11 @@ impl<'a> Parser<'a> {
|
|||||||
|
|
||||||
if !self.eat(term) {
|
if !self.eat(term) {
|
||||||
let token_str = self.this_token_to_string();
|
let token_str = self.this_token_to_string();
|
||||||
return Err(self.fatal(&format!("expected item, found `{}`", token_str)));
|
let mut err = self.fatal(&format!("expected item, found `{}`", token_str));
|
||||||
|
if token_str == ";" {
|
||||||
|
err.note("consider removing the semicolon");
|
||||||
|
}
|
||||||
|
return Err();
|
||||||
}
|
}
|
||||||
|
|
||||||
let hi = if self.span == syntax_pos::DUMMY_SP {
|
let hi = if self.span == syntax_pos::DUMMY_SP {
|
||||||
|
|||||||
Reference in New Issue
Block a user