diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index c1dd75b47c8..c0e5d6f1397 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -720,9 +720,9 @@ impl<'a> Parser<'a> { // {foo(bar {}} // - ^ help: `)` may belong here // | - // in order to close this... + // unclosed delimiter if let Some(sp) = unmatched.unclosed_span { - err.span_label(sp, "in order to close this..."); + err.span_label(sp, "unclosed delimiter"); } err.span_suggestion_short( self.sess.source_map().next_point(self.prev_span), diff --git a/src/test/ui/parser/issue-10636-2.stderr b/src/test/ui/parser/issue-10636-2.stderr index 670a116eb51..38d57ce5723 100644 --- a/src/test/ui/parser/issue-10636-2.stderr +++ b/src/test/ui/parser/issue-10636-2.stderr @@ -5,7 +5,7 @@ LL | option.map(|some| 42; | - ^ | | | | | help: `)` may belong here - | in order to close this... + | unclosed delimiter error: expected expression, found `)` --> $DIR/issue-10636-2.rs:8:1 diff --git a/src/test/ui/parser/issue-2354.rs b/src/test/ui/parser/issue-2354.rs index b383bc00f91..565f84822f7 100644 --- a/src/test/ui/parser/issue-2354.rs +++ b/src/test/ui/parser/issue-2354.rs @@ -1,5 +1,4 @@ -fn foo() { - //~^ NOTE un-closed delimiter +fn foo() { //~ NOTE un-closed delimiter match Some(10) { //~^ NOTE this delimiter might not be properly closed... Some(y) => { panic!(); } diff --git a/src/test/ui/parser/issue-2354.stderr b/src/test/ui/parser/issue-2354.stderr index f1b0905d866..0f4cd5724ce 100644 --- a/src/test/ui/parser/issue-2354.stderr +++ b/src/test/ui/parser/issue-2354.stderr @@ -1,9 +1,8 @@ error: this file contains an un-closed delimiter - --> $DIR/issue-2354.rs:16:66 + --> $DIR/issue-2354.rs:15:66 | -LL | fn foo() { +LL | fn foo() { //~ NOTE un-closed delimiter | - un-closed delimiter -LL | //~^ NOTE un-closed delimiter LL | match Some(10) { | - this delimiter might not be properly closed... ... @@ -17,7 +16,7 @@ error[E0601]: `main` function not found in crate `issue_2354` | = note: the main function must be defined at the crate level but you have one or more functions named 'main' that are not defined at the crate level. Either move the definition or attach the `#[main]` attribute to override this behavior. note: here is a function named 'main' - --> $DIR/issue-2354.rs:15:1 + --> $DIR/issue-2354.rs:14:1 | LL | fn main() {} //~ NOTE here is a function named 'main' | ^^^^^^^^^^^^ diff --git a/src/test/ui/resolve/token-error-correct-3.stderr b/src/test/ui/resolve/token-error-correct-3.stderr index fcc1c34d1fc..a6bb83c71f3 100644 --- a/src/test/ui/resolve/token-error-correct-3.stderr +++ b/src/test/ui/resolve/token-error-correct-3.stderr @@ -5,7 +5,7 @@ LL | callback(path.as_ref(); //~ ERROR expected one of | - ^ | | | | | help: `)` may belong here - | in order to close this... + | unclosed delimiter error: expected one of `.`, `;`, `?`, `}`, or an operator, found `)` --> $DIR/token-error-correct-3.rs:20:9