Remove semicolon note

Added note that specifies a semicolon should be removed after a given struct
This commit is contained in:
colinmarsh19 2017-11-25 08:38:30 -07:00 committed by GitHub
parent cc6b88ccb2
commit aabacf791a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5486,7 +5486,11 @@ impl<'a> Parser<'a> {
if !self.eat(term) {
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 {