Skip to content

Commit 336c48c

Browse files
committed
tweak wording based on in person feedback
1 parent cba9661 commit 336c48c

File tree

5 files changed

+8
-10
lines changed

5 files changed

+8
-10
lines changed

src/libsyntax/parse/parser.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -720,9 +720,9 @@ impl<'a> Parser<'a> {
720720
// {foo(bar {}}
721721
// - ^ help: `)` may belong here
722722
// |
723-
// in order to close this...
723+
// unclosed delimiter
724724
if let Some(sp) = unmatched.unclosed_span {
725-
err.span_label(sp, "in order to close this...");
725+
err.span_label(sp, "unclosed delimiter");
726726
}
727727
err.span_suggestion_short(
728728
self.sess.source_map().next_point(self.prev_span),

src/test/ui/parser/issue-10636-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | option.map(|some| 42;
55
| - ^
66
| | |
77
| | help: `)` may belong here
8-
| in order to close this...
8+
| unclosed delimiter
99

1010
error: expected expression, found `)`
1111
--> $DIR/issue-10636-2.rs:8:1

src/test/ui/parser/issue-2354.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
fn foo() {
2-
//~^ NOTE un-closed delimiter
1+
fn foo() { //~ NOTE un-closed delimiter
32
match Some(10) {
43
//~^ NOTE this delimiter might not be properly closed...
54
Some(y) => { panic!(); }

src/test/ui/parser/issue-2354.stderr

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
error: this file contains an un-closed delimiter
2-
--> $DIR/issue-2354.rs:16:66
2+
--> $DIR/issue-2354.rs:15:66
33
|
4-
LL | fn foo() {
4+
LL | fn foo() { //~ NOTE un-closed delimiter
55
| - un-closed delimiter
6-
LL | //~^ NOTE un-closed delimiter
76
LL | match Some(10) {
87
| - this delimiter might not be properly closed...
98
...
@@ -17,7 +16,7 @@ error[E0601]: `main` function not found in crate `issue_2354`
1716
|
1817
= 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.
1918
note: here is a function named 'main'
20-
--> $DIR/issue-2354.rs:15:1
19+
--> $DIR/issue-2354.rs:14:1
2120
|
2221
LL | fn main() {} //~ NOTE here is a function named 'main'
2322
| ^^^^^^^^^^^^

src/test/ui/resolve/token-error-correct-3.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | callback(path.as_ref(); //~ ERROR expected one of
55
| - ^
66
| | |
77
| | help: `)` may belong here
8-
| in order to close this...
8+
| unclosed delimiter
99

1010
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `)`
1111
--> $DIR/token-error-correct-3.rs:20:9

0 commit comments

Comments
 (0)