Skip to content

Commit

Permalink
Rollup merge of #108244 - lukas-code:semicolon-recovery-span, r=cjgillot
Browse files Browse the repository at this point in the history
Add test for semicolon recovery ICE

closes #108242
  • Loading branch information
matthiaskrgr authored Mar 5, 2023
2 parents 73c8d2d + a435b3c commit ced9cd1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/ui/parser/issues/issue-108242-semicolon-recovery.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
fn foo() {}
fn main() {
foo(;
foo(;
} //~ ERROR mismatched closing delimiter
13 changes: 13 additions & 0 deletions tests/ui/parser/issues/issue-108242-semicolon-recovery.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
error: mismatched closing delimiter: `}`
--> $DIR/issue-108242-semicolon-recovery.rs:4:8
|
LL | fn main() {
| - closing delimiter possibly meant for this
LL | foo(;
LL | foo(;
| ^ unclosed delimiter
LL | }
| ^ mismatched closing delimiter

error: aborting due to previous error

0 comments on commit ced9cd1

Please sign in to comment.