Changed from note to span_suggestion_short

This commit is contained in:
colinmarsh19
2017-11-25 18:34:20 -07:00
committed by GitHub
parent 8e60f720fb
commit 3e8883e2aa

View File

@@ -5487,8 +5487,9 @@ impl<'a> Parser<'a> {
if !self.eat(term) {
let token_str = self.this_token_to_string();
let mut err = self.fatal(&format!("expected item, found `{}`", token_str));
let msg = "consider removing this semicolon";
if token_str == ";" {
err.note("consider removing the semicolon");
err.span_suggestion_short(self.span, msg, "".to_string());
}
return Err(err);
}