diff --git a/src/test/ui/parser/issue-81804.rs b/src/test/ui/parser/issue-81804.rs new file mode 100644 index 00000000000..803bde11e20 --- /dev/null +++ b/src/test/ui/parser/issue-81804.rs @@ -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([=(} diff --git a/src/test/ui/parser/issue-81804.stderr b/src/test/ui/parser/issue-81804.stderr new file mode 100644 index 00000000000..19c4422c622 --- /dev/null +++ b/src/test/ui/parser/issue-81804.stderr @@ -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 +