Skip to content

Commit 3e8883e

Browse files
authored
Changed from note to span_suggestion_short
1 parent 8e60f72 commit 3e8883e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libsyntax/parse/parser.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -5487,8 +5487,9 @@ impl<'a> Parser<'a> {
54875487
if !self.eat(term) {
54885488
let token_str = self.this_token_to_string();
54895489
let mut err = self.fatal(&format!("expected item, found `{}`", token_str));
5490+
let msg = "consider removing this semicolon";
54905491
if token_str == ";" {
5491-
err.note("consider removing the semicolon");
5492+
err.span_suggestion_short(self.span, msg, "".to_string());
54925493
}
54935494
return Err(err);
54945495
}

0 commit comments

Comments
 (0)