Rollup merge of #97075 - JohnTitor:issue-81804, r=compiler-errors

Add regression test for #81804

Closes #81804
r? ``@compiler-errors``
This commit is contained in:
Yuki Okushi 2022-05-17 19:01:31 +09:00 committed by GitHub
commit aaa0c014e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,9 @@
// error-pattern: this file contains an unclosed delimiter
// error-pattern: this file contains an unclosed delimiter
// error-pattern: expected pattern, found `=`
// error-pattern: expected one of `)`, `,`, `->`, `where`, or `{`, found `]`
// error-pattern: expected item, found `]`
fn main() {}
fn p([=(}

View File

@ -0,0 +1,41 @@
error: this file contains an unclosed delimiter
--> $DIR/issue-81804.rs:9:11
|
LL | fn p([=(}
| -- ^
| ||
| |unclosed delimiter
| unclosed delimiter
error: this file contains an unclosed delimiter
--> $DIR/issue-81804.rs:9:11
|
LL | fn p([=(}
| -- ^
| ||
| |unclosed delimiter
| unclosed delimiter
error: expected pattern, found `=`
--> $DIR/issue-81804.rs:9:7
|
LL | fn p([=(}
| ^ expected pattern
error: expected one of `)`, `,`, `->`, `where`, or `{`, found `]`
--> $DIR/issue-81804.rs:9:8
|
LL | fn p([=(}
| ^ -^
| | |
| | help: `)` may belong here
| unclosed delimiter
error: expected item, found `]`
--> $DIR/issue-81804.rs:9:11
|
LL | fn p([=(}
| ^ expected item
error: aborting due to 5 previous errors