Skip to content

Commit 3192d3d

Browse files
committed
Change wording of unclosed delimiter label
1 parent b2d2d83 commit 3192d3d

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

src/libsyntax/parse/lexer/tokentrees.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ impl<'a> StringReader<'a> {
5858
.next() // these are in reverse order as they get inserted on close, but
5959
{ // we want the last open/first close
6060
if d == delim {
61-
err.span_label(*open_sp, "this might be the culprit...");
61+
err.span_label(
62+
*open_sp,
63+
"this delimiter might not be properly closed...",
64+
);
6265
err.span_label(
6366
*close_sp,
6467
"...as it matches this but it has different indentation",

src/test/ui/issue-2354.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
fn foo() { //~ NOTE un-closed delimiter
1414
match Some(x) {
15-
//~^ NOTE this might be the culprit...
15+
//~^ NOTE this delimiter might not be properly closed...
1616
Some(y) => { panic!(); }
1717
None => { panic!(); }
1818
}

src/test/ui/issue-2354.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: this file contains an un-closed delimiter
44
LL | fn foo() { //~ NOTE un-closed delimiter
55
| - un-closed delimiter
66
LL | match Some(x) {
7-
| - this might be the culprit...
7+
| - this delimiter might not be properly closed...
88
...
99
LL | }
1010
| - ...as it matches this but it has different indentation

src/test/ui/parser-recovery-1.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: this file contains an un-closed delimiter
44
LL | trait Foo {
55
| - un-closed delimiter
66
LL | fn bar() {
7-
| - this might be the culprit...
7+
| - this delimiter might not be properly closed...
88
...
99
LL | }
1010
| - ...as it matches this but it has different indentation

src/test/ui/parser/unclosed-braces.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fn main() {
2424
//~^ NOTE un-closed delimiter
2525
{
2626
{
27-
//~^ NOTE this might be the culprit...
27+
//~^ NOTE this delimiter might not be properly closed...
2828
foo();
2929
}
3030
//~^ NOTE ...as it matches this but it has different indentation

src/test/ui/parser/unclosed-braces.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | fn main() {
55
| - un-closed delimiter
66
...
77
LL | {
8-
| - this might be the culprit...
8+
| - this delimiter might not be properly closed...
99
...
1010
LL | }
1111
| - ...as it matches this but it has different indentation

0 commit comments

Comments
 (0)