Skip to content

Commit

Permalink
Change wording of unclosed delimiter label
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Sep 5, 2018
1 parent b2d2d83 commit 3192d3d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/libsyntax/parse/lexer/tokentrees.rs
Expand Up @@ -58,7 +58,10 @@ impl<'a> StringReader<'a> {
.next() // these are in reverse order as they get inserted on close, but
{ // we want the last open/first close
if d == delim {
err.span_label(*open_sp, "this might be the culprit...");
err.span_label(
*open_sp,
"this delimiter might not be properly closed...",
);
err.span_label(
*close_sp,
"...as it matches this but it has different indentation",
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issue-2354.rs
Expand Up @@ -12,7 +12,7 @@

fn foo() { //~ NOTE un-closed delimiter
match Some(x) {
//~^ NOTE this might be the culprit...
//~^ NOTE this delimiter might not be properly closed...
Some(y) => { panic!(); }
None => { panic!(); }
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issue-2354.stderr
Expand Up @@ -4,7 +4,7 @@ error: this file contains an un-closed delimiter
LL | fn foo() { //~ NOTE un-closed delimiter
| - un-closed delimiter
LL | match Some(x) {
| - this might be the culprit...
| - this delimiter might not be properly closed...
...
LL | }
| - ...as it matches this but it has different indentation
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/parser-recovery-1.stderr
Expand Up @@ -4,7 +4,7 @@ error: this file contains an un-closed delimiter
LL | trait Foo {
| - un-closed delimiter
LL | fn bar() {
| - this might be the culprit...
| - this delimiter might not be properly closed...
...
LL | }
| - ...as it matches this but it has different indentation
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/parser/unclosed-braces.rs
Expand Up @@ -24,7 +24,7 @@ fn main() {
//~^ NOTE un-closed delimiter
{
{
//~^ NOTE this might be the culprit...
//~^ NOTE this delimiter might not be properly closed...
foo();
}
//~^ NOTE ...as it matches this but it has different indentation
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/parser/unclosed-braces.stderr
Expand Up @@ -5,7 +5,7 @@ LL | fn main() {
| - un-closed delimiter
...
LL | {
| - this might be the culprit...
| - this delimiter might not be properly closed...
...
LL | }
| - ...as it matches this but it has different indentation
Expand Down

0 comments on commit 3192d3d

Please sign in to comment.