tweak wording based on in person feedback
This commit is contained in:
parent
cba96613de
commit
336c48cc7b
5 changed files with 8 additions and 10 deletions
|
@ -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),
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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!(); }
|
||||
|
|
|
@ -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...
|
||||
...
|
||||
|
@ -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'
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue