Skip to content

Commit

Permalink
use span_suggestion instead of span_suggestion_verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
TaKO8Ki committed Aug 13, 2022
1 parent 48c0341 commit d47df26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_parse/src/parser/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ impl<'a> Parser<'a> {
.span_label(non_item_span, "non-item starts here")
.span_label(self.prev_token.span, "item list ends here");
if is_unnecessary_semicolon {
err.span_suggestion_verbose(
err.span_suggestion(
semicolon_span,
"consider removing this semicolon",
"",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@ error: non-item in item list
LL | trait Foo {
| - item list starts here
LL | fn bar() {};
| ^ non-item starts here
| ^
| |
| non-item starts here
| help: consider removing this semicolon
LL | }
| - item list ends here
|
help: consider removing this semicolon
|
LL - fn bar() {};
LL + fn bar() {}
|

error: aborting due to previous error

0 comments on commit d47df26

Please sign in to comment.