forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#67835 - euclio:delimiter-wording, r=Centril
tweak wording of mismatched delimiter errors This PR improves the wording of the "incorrect delimiter" error messages. Here's a quick rationale: - *"un-closed" -> "unclosed"*: "unclosed" is valid English, so there's no need to hyphenate the prefix. This should be pretty uncontroversial, I think. - *"close delimiter" -> "closing delimiter"*: In my anecdotal experience, I've always heard "closing delimiter" or "closing parenthesis". In addition, the codebase already uses this terminology in comments and function names more than "close delimiter", which could indicate that it's more intuitive. - "incorrect delimiter" -> "mismatched delimiter": "Incorrect delimiter" is vague; why is it incorrect? "mismatched" clearly indicates why the delimiter is causing the error. r? @estebank
- Loading branch information
Showing
50 changed files
with
135 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
struct Obj { | ||
//~^ NOTE: un-closed delimiter | ||
//~^ NOTE: unclosed delimiter | ||
member: usize | ||
) | ||
//~^ ERROR incorrect close delimiter | ||
//~| NOTE incorrect close delimiter | ||
//~^ ERROR mismatched closing delimiter | ||
//~| NOTE mismatched closing delimiter | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
error: incorrect close delimiter: `)` | ||
error: mismatched closing delimiter: `)` | ||
--> $DIR/issue-10636-1.rs:4:1 | ||
| | ||
LL | struct Obj { | ||
| - un-closed delimiter | ||
| - unclosed delimiter | ||
... | ||
LL | ) | ||
| ^ incorrect close delimiter | ||
| ^ mismatched closing delimiter | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
static foo: isize = 2; } //~ ERROR unexpected close delimiter: | ||
static foo: isize = 2; } //~ ERROR unexpected closing delimiter: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
error: unexpected close delimiter: `}` | ||
error: unexpected closing delimiter: `}` | ||
--> $DIR/issue-2354-1.rs:1:24 | ||
| | ||
LL | static foo: isize = 2; } | ||
| ^ unexpected close delimiter | ||
| ^ unexpected closing delimiter | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
error: this file contains an un-closed delimiter | ||
--> $DIR/issue-2354.rs:15:53 | ||
error: this file contains an unclosed delimiter | ||
--> $DIR/issue-2354.rs:15:52 | ||
| | ||
LL | fn foo() { | ||
| - un-closed delimiter | ||
| - unclosed delimiter | ||
LL | match Some(10) { | ||
| - this delimiter might not be properly closed... | ||
... | ||
LL | } | ||
| - ...as it matches this but it has different indentation | ||
... | ||
LL | | ||
| ^ | ||
| ^ | ||
|
||
error: aborting due to previous error | ||
|
4 changes: 2 additions & 2 deletions
4
src/test/ui/parser/issue-58094-missing-right-square-bracket.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
pub t(# | ||
//~^ ERROR missing `fn` or `struct` for function or struct definition | ||
//~ ERROR this file contains an un-closed delimiter | ||
//~ ERROR this file contains an unclosed delimiter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
error: incorrect close delimiter: `)` | ||
error: mismatched closing delimiter: `)` | ||
--> $DIR/macro-mismatched-delim-brace-paren.rs:6:5 | ||
| | ||
LL | foo! { | ||
| - un-closed delimiter | ||
| - unclosed delimiter | ||
LL | bar, "baz", 1, 2.0 | ||
LL | ) | ||
| ^ incorrect close delimiter | ||
| ^ mismatched closing delimiter | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
fn main() { | ||
foo! ( | ||
bar, "baz", 1, 2.0 | ||
} //~ ERROR incorrect close delimiter | ||
} //~ ERROR unexpected close delimiter: `}` | ||
} //~ ERROR mismatched closing delimiter | ||
} //~ ERROR unexpected closing delimiter: `}` |
Oops, something went wrong.