File tree Expand file tree Collapse file tree 10 files changed +25
-26
lines changed Expand file tree Collapse file tree 10 files changed +25
-26
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ impl<'a> StringReader<'a> {
49
49
let msg = "this file contains an un-closed delimiter" ;
50
50
let mut err = self . sess . span_diagnostic . struct_span_err ( self . span , msg) ;
51
51
for & ( _, sp) in & self . open_braces {
52
- err. span_help ( sp, "did you mean to close this delimiter? " ) ;
52
+ err. span_label ( sp, "un-closed delimiter" ) ;
53
53
}
54
54
55
55
Err ( err)
@@ -94,7 +94,7 @@ impl<'a> StringReader<'a> {
94
94
// delimiter. The previous unclosed delimiters could actually be
95
95
// closed! The parser just hasn't gotten to them yet.
96
96
if let Some ( & ( _, sp) ) = self . open_braces . last ( ) {
97
- err. span_label ( sp, "unclosed delimiter" ) ;
97
+ err. span_label ( sp, "un-closed delimiter" ) ;
98
98
} ;
99
99
err. emit ( ) ;
100
100
}
Original file line number Diff line number Diff line change 10
10
11
11
// compile-flags: -Z parse-only
12
12
13
- struct Obj { //~ NOTE: unclosed delimiter
13
+ struct Obj {
14
+ //~^ NOTE: un-closed delimiter
14
15
member : usize
15
16
)
16
17
//~^ ERROR incorrect close delimiter
Original file line number Diff line number Diff line change 1
1
error: incorrect close delimiter: `)`
2
- --> $DIR/issue-10636-1.rs:15 :1
2
+ --> $DIR/issue-10636-1.rs:16 :1
3
3
|
4
- LL | struct Obj { //~ NOTE: unclosed delimiter
5
- | - unclosed delimiter
6
- LL | member: usize
4
+ LL | struct Obj {
5
+ | - un-closed delimiter
6
+ ...
7
7
LL | )
8
8
| ^ incorrect close delimiter
9
9
Original file line number Diff line number Diff line change 14
14
15
15
trait Foo {
16
16
fn bar ( ) {
17
- let x = foo ( ) ; //~ ERROR cannot find function `foo` in this scope
18
-
17
+ let x = foo ( ) ;
18
+ //~^ ERROR cannot find function `foo` in this scope
19
19
}
20
20
21
21
fn main ( ) {
22
- let x = y. ; //~ ERROR unexpected token
23
- //~^ ERROR cannot find value `y` in this scope
22
+ let x = y. ;
23
+ //~^ ERROR unexpected token
24
+ //~| ERROR cannot find value `y` in this scope
24
25
} //~ ERROR this file contains an un-closed delimiter
Original file line number Diff line number Diff line change 1
1
error: this file contains an un-closed delimiter
2
- --> $DIR/parser-recovery-1.rs:24 :55
2
+ --> $DIR/parser-recovery-1.rs:25 :55
3
3
|
4
+ LL | trait Foo {
5
+ | - un-closed delimiter
6
+ ...
4
7
LL | } //~ ERROR this file contains an un-closed delimiter
5
8
| ^
6
- |
7
- help: did you mean to close this delimiter?
8
- --> $DIR/parser-recovery-1.rs:15:11
9
- |
10
- LL | trait Foo {
11
- | ^
12
9
13
10
error: unexpected token: `;`
14
11
--> $DIR/parser-recovery-1.rs:22:15
15
12
|
16
- LL | let x = y.; //~ ERROR unexpected token
13
+ LL | let x = y.;
17
14
| ^
18
15
19
16
error[E0425]: cannot find function `foo` in this scope
20
17
--> $DIR/parser-recovery-1.rs:17:17
21
18
|
22
- LL | let x = foo(); //~ ERROR cannot find function `foo` in this scope
19
+ LL | let x = foo();
23
20
| ^^^ not found in this scope
24
21
25
22
error[E0425]: cannot find value `y` in this scope
26
23
--> $DIR/parser-recovery-1.rs:22:13
27
24
|
28
- LL | let x = y.; //~ ERROR unexpected token
25
+ LL | let x = y.;
29
26
| ^ not found in this scope
30
27
31
28
error[E0601]: `main` function not found in crate `parser_recovery_1`
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ error: incorrect close delimiter: `)`
2
2
--> $DIR/parser-recovery-2.rs:18:5
3
3
|
4
4
LL | fn bar() {
5
- | - unclosed delimiter
5
+ | - un-closed delimiter
6
6
LL | let x = foo(); //~ ERROR cannot find function `foo` in this scope
7
7
LL | ) //~ ERROR incorrect close delimiter: `)`
8
8
| ^ incorrect close delimiter
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ error: incorrect close delimiter: `)`
2
2
--> $DIR/token-error-correct-2.rs:16:5
3
3
|
4
4
LL | if foo {
5
- | - unclosed delimiter
5
+ | - un-closed delimiter
6
6
LL | //~^ ERROR: cannot find value `foo`
7
7
LL | ) //~ ERROR: incorrect close delimiter: `)`
8
8
| ^ incorrect close delimiter
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ error: incorrect close delimiter: `}`
2
2
--> $DIR/token-error-correct-3.rs:30:9
3
3
|
4
4
LL | callback(path.as_ref(); //~ ERROR expected one of
5
- | - unclosed delimiter
5
+ | - un-closed delimiter
6
6
...
7
7
LL | } else { //~ ERROR: incorrect close delimiter: `}`
8
8
| ^ incorrect close delimiter
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ error: incorrect close delimiter: `}`
2
2
--> $DIR/token-error-correct.rs:16:1
3
3
|
4
4
LL | foo(bar(;
5
- | - unclosed delimiter
5
+ | - un-closed delimiter
6
6
LL | //~^ ERROR: expected expression, found `;`
7
7
LL | }
8
8
| ^ incorrect close delimiter
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ error: incorrect close delimiter: `}`
2
2
--> $DIR/issue-10636-2.rs:18:1
3
3
|
4
4
LL | option.map(|some| 42;
5
- | - unclosed delimiter
5
+ | - un-closed delimiter
6
6
...
7
7
LL | } //~ ERROR: incorrect close delimiter
8
8
| ^ incorrect close delimiter
You can’t perform that action at this time.
0 commit comments