Remove the redundant span_label.

This commit is contained in:
laurent 2017-11-01 23:43:32 +00:00
parent d336f022d5
commit ed20f3b5c0
2 changed files with 1 additions and 5 deletions

View File

@ -3158,7 +3158,6 @@ impl<'a> Parser<'a> {
let in_span = self.prev_span.between(self.span);
let mut err = self.sess.span_diagnostic
.struct_span_err(in_span, "missing `in` in `for` loop");
err.span_label(in_span, "expected `in` here");
err.span_suggestion_short(in_span, "try adding `in` here", " in ".into());
err.emit();
}

View File

@ -2,10 +2,7 @@ error: missing `in` in `for` loop
--> $DIR/issue-40782.rs:12:10
|
12 | for i 0..2 {
| ^
| |
| expected `in` here
| help: try adding `in` here
| ^ help: try adding `in` here
error: aborting due to previous error