Skip to content

Commit

Permalink
tweak wording based on in person feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Feb 7, 2019
1 parent cba9661 commit 336c48c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/libsyntax/parse/parser.rs
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/parser/issue-10636-2.stderr
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions 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!(); }
Expand Down
7 changes: 3 additions & 4 deletions 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...
...
Expand All @@ -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'
| ^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/resolve/token-error-correct-3.stderr
Expand Up @@ -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
Expand Down

0 comments on commit 336c48c

Please sign in to comment.