about summary refs log tree commit diff
path: root/src/test/ui/parser
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-08-02 12:14:21 +0200
committerGitHub <noreply@github.com>2019-08-02 12:14:21 +0200
commit3396550420fb78fea45d8abdadb7dee60d40a6ca (patch)
tree5137be0d0fe4bb07b38dafe9d1294c7f8c8416eb /src/test/ui/parser
parent89dce46efdc7a626436b0ac8f825ac795a8799ad (diff)
parentb3321fb26ed8376b8c7e244d037d2763b12641cb (diff)
downloadrust-3396550420fb78fea45d8abdadb7dee60d40a6ca.tar.gz
rust-3396550420fb78fea45d8abdadb7dee60d40a6ca.zip
Rollup merge of #63202 - exphp-forks:parser-ice-63135, r=estebank
Fix ICE in #63135

Closes #63135.

r?@estebank
Diffstat (limited to 'src/test/ui/parser')
-rw-r--r--src/test/ui/parser/issue-63135.rs3
-rw-r--r--src/test/ui/parser/issue-63135.stderr44
2 files changed, 47 insertions, 0 deletions
diff --git a/src/test/ui/parser/issue-63135.rs b/src/test/ui/parser/issue-63135.rs
new file mode 100644
index 00000000000..d5f5f1469f3
--- /dev/null
+++ b/src/test/ui/parser/issue-63135.rs
@@ -0,0 +1,3 @@
+// error-pattern: aborting due to 6 previous errors
+
+fn i(n{...,f #
diff --git a/src/test/ui/parser/issue-63135.stderr b/src/test/ui/parser/issue-63135.stderr
new file mode 100644
index 00000000000..c0286d90af7
--- /dev/null
+++ b/src/test/ui/parser/issue-63135.stderr
@@ -0,0 +1,44 @@
+error: this file contains an un-closed delimiter
+  --> $DIR/issue-63135.rs:3:16
+   |
+LL | fn i(n{...,f #
+   |     - -        ^
+   |     | |
+   |     | un-closed delimiter
+   |     un-closed delimiter
+
+error: expected field pattern, found `...`
+  --> $DIR/issue-63135.rs:3:8
+   |
+LL | fn i(n{...,f #
+   |        ^^^ help: to omit remaining fields, use one fewer `.`: `..`
+
+error: expected `}`, found `,`
+  --> $DIR/issue-63135.rs:3:11
+   |
+LL | fn i(n{...,f #
+   |        ---^
+   |        |  |
+   |        |  expected `}`
+   |        `..` must be at the end and cannot have a trailing comma
+
+error: expected `[`, found `}`
+  --> $DIR/issue-63135.rs:3:15
+   |
+LL | fn i(n{...,f #
+   |               ^ expected `[`
+
+error: expected `:`, found `)`
+  --> $DIR/issue-63135.rs:3:15
+   |
+LL | fn i(n{...,f #
+   |               ^ expected `:`
+
+error: expected one of `->`, `where`, or `{`, found `<eof>`
+  --> $DIR/issue-63135.rs:3:15
+   |
+LL | fn i(n{...,f #
+   |               ^ expected one of `->`, `where`, or `{` here
+
+error: aborting due to 6 previous errors
+