Skip to content

Commit ed20f3b

Browse files
committed
Remove the redundant span_label.
1 parent d336f02 commit ed20f3b

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/libsyntax/parse/parser.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3158,7 +3158,6 @@ impl<'a> Parser<'a> {
31583158
let in_span = self.prev_span.between(self.span);
31593159
let mut err = self.sess.span_diagnostic
31603160
.struct_span_err(in_span, "missing `in` in `for` loop");
3161-
err.span_label(in_span, "expected `in` here");
31623161
err.span_suggestion_short(in_span, "try adding `in` here", " in ".into());
31633162
err.emit();
31643163
}

src/test/ui/issue-40782.stderr

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ error: missing `in` in `for` loop
22
--> $DIR/issue-40782.rs:12:10
33
|
44
12 | for i 0..2 {
5-
| ^
6-
| |
7-
| expected `in` here
8-
| help: try adding `in` here
5+
| ^ help: try adding `in` here
96

107
error: aborting due to previous error
118

0 commit comments

Comments
 (0)