about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorlaurent <laurent.mazare@gmail.com>2017-11-01 23:43:32 +0000
committerlaurent <laurent.mazare@gmail.com>2017-11-01 23:43:32 +0000
commited20f3b5c0ae32802450c77da5c94c239c3a3500 (patch)
treed3b969d3ef92d176e15db82c16c1820a266ef5ee /src
parentd336f022d56b7d1b0ed181de0c88b12bb9b2ae39 (diff)
Remove the redundant span_label.
Diffstat (limited to 'src')
-rw-r--r--src/libsyntax/parse/parser.rs1
-rw-r--r--src/test/ui/issue-40782.stderr5
2 files changed, 1 insertions, 5 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index ec9b22ae5a2..6de2ca5b9b8 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -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();
         }
diff --git a/src/test/ui/issue-40782.stderr b/src/test/ui/issue-40782.stderr
index ab87438555b..0d49eebbdbf 100644
--- a/src/test/ui/issue-40782.stderr
+++ b/src/test/ui/issue-40782.stderr
@@ -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