Skip to content

Commit ced9cd1

Browse files
authored
Rollup merge of #108244 - lukas-code:semicolon-recovery-span, r=cjgillot
Add test for semicolon recovery ICE closes #108242
2 parents 73c8d2d + a435b3c commit ced9cd1

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
fn foo() {}
2+
fn main() {
3+
foo(;
4+
foo(;
5+
} //~ ERROR mismatched closing delimiter
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
error: mismatched closing delimiter: `}`
2+
--> $DIR/issue-108242-semicolon-recovery.rs:4:8
3+
|
4+
LL | fn main() {
5+
| - closing delimiter possibly meant for this
6+
LL | foo(;
7+
LL | foo(;
8+
| ^ unclosed delimiter
9+
LL | }
10+
| ^ mismatched closing delimiter
11+
12+
error: aborting due to previous error
13+

0 commit comments

Comments
 (0)