-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #108244 - lukas-code:semicolon-recovery-span, r=cjgillot
Add test for semicolon recovery ICE closes #108242
- Loading branch information
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
13
tests/ui/parser/issues/issue-108242-semicolon-recovery.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|