Skip to content

Commit

Permalink
Rollup merge of rust-lang#97075 - JohnTitor:issue-81804, r=compiler-e…
Browse files Browse the repository at this point in the history
…rrors

Add regression test for rust-lang#81804

Closes rust-lang#81804
r? `@compiler-errors`
  • Loading branch information
Dylan-DPC authored May 17, 2022
2 parents 12a2138 + a3bc2e5 commit c90e275
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/ui/parser/issue-81804.rs
Original file line number Diff line number Diff line change
@@ -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([=(}
41 changes: 41 additions & 0 deletions src/test/ui/parser/issue-81804.stderr
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c90e275

Please sign in to comment.