1
Fork 0

tweak wording based on in person feedback

This commit is contained in:
Esteban Küber 2019-02-05 15:41:29 -08:00
parent cba96613de
commit 336c48cc7b
5 changed files with 8 additions and 10 deletions

View file

@ -720,9 +720,9 @@ impl<'a> Parser<'a> {
// {foo(bar {}} // {foo(bar {}}
// - ^ help: `)` may belong here // - ^ help: `)` may belong here
// | // |
// in order to close this... // unclosed delimiter
if let Some(sp) = unmatched.unclosed_span { 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( err.span_suggestion_short(
self.sess.source_map().next_point(self.prev_span), self.sess.source_map().next_point(self.prev_span),

View file

@ -5,7 +5,7 @@ LL | option.map(|some| 42;
| - ^ | - ^
| | | | | |
| | help: `)` may belong here | | help: `)` may belong here
| in order to close this... | unclosed delimiter
error: expected expression, found `)` error: expected expression, found `)`
--> $DIR/issue-10636-2.rs:8:1 --> $DIR/issue-10636-2.rs:8:1

View file

@ -1,5 +1,4 @@
fn foo() { fn foo() { //~ NOTE un-closed delimiter
//~^ NOTE un-closed delimiter
match Some(10) { match Some(10) {
//~^ NOTE this delimiter might not be properly closed... //~^ NOTE this delimiter might not be properly closed...
Some(y) => { panic!(); } Some(y) => { panic!(); }

View file

@ -1,9 +1,8 @@
error: this file contains an un-closed delimiter 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 | - un-closed delimiter
LL | //~^ NOTE un-closed delimiter
LL | match Some(10) { LL | match Some(10) {
| - this delimiter might not be properly closed... | - this delimiter might not be properly closed...
... ...
@ -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: 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' 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' LL | fn main() {} //~ NOTE here is a function named 'main'
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^

View file

@ -5,7 +5,7 @@ LL | callback(path.as_ref(); //~ ERROR expected one of
| - ^ | - ^
| | | | | |
| | help: `)` may belong here | | help: `)` may belong here
| in order to close this... | unclosed delimiter
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `)` error: expected one of `.`, `;`, `?`, `}`, or an operator, found `)`
--> $DIR/token-error-correct-3.rs:20:9 --> $DIR/token-error-correct-3.rs:20:9