]> git.lizzy.rs Git - rust.git/commitdiff
add non-regression test for issue #76597
authorAurélien Deharbe <aurelien.deharbe@ssi.gouv.fr>
Fri, 11 Sep 2020 11:58:03 +0000 (13:58 +0200)
committerAurélien Deharbe <aurelien.deharbe@ssi.gouv.fr>
Fri, 11 Sep 2020 11:58:03 +0000 (13:58 +0200)
src/test/ui/issue-76597.rs [new file with mode: 0644]
src/test/ui/issue-76597.stderr [new file with mode: 0644]

diff --git a/src/test/ui/issue-76597.rs b/src/test/ui/issue-76597.rs
new file mode 100644 (file)
index 0000000..879e6b4
--- /dev/null
@@ -0,0 +1,7 @@
+fn f(
+                                     x: u8
+                                     y: u8,
+) {}
+//~^^ ERROR: expected one of `!`, `(`, `)`, `+`, `,`, `::`, or `<`, found `y`
+
+fn main() {}
diff --git a/src/test/ui/issue-76597.stderr b/src/test/ui/issue-76597.stderr
new file mode 100644 (file)
index 0000000..163ce61
--- /dev/null
@@ -0,0 +1,14 @@
+error: expected one of `!`, `(`, `)`, `+`, `,`, `::`, or `<`, found `y`
+  --> $DIR/issue-76597.rs:3:38
+   |
+LL |   ...                   x: u8
+   |                              - expected one of 7 possible tokens
+   |  ____________________________|
+   | |
+LL | | ...                   y: u8,
+|  | |                       ^ unexpected token
+|  | |
+   |   help: missing `,`
+
+error: aborting due to previous error
+