Rollup merge of #108244 - lukas-code:semicolon-recovery-span, r=cjgillot

Add test for semicolon recovery ICE

closes https://github.com/rust-lang/rust/issues/108242
This commit is contained in:
Matthias Krüger 2023-03-05 20:57:20 +01:00 committed by GitHub
commit ced9cd19c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,5 @@
fn foo() {}
fn main() {
foo(;
foo(;
} //~ ERROR mismatched closing delimiter

View File

@ -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