summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/do-not-suggest-semicolon-before-array.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/do-not-suggest-semicolon-before-array.rs')
-rw-r--r--tests/ui/parser/do-not-suggest-semicolon-before-array.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/parser/do-not-suggest-semicolon-before-array.rs b/tests/ui/parser/do-not-suggest-semicolon-before-array.rs
new file mode 100644
index 000000000..7ebf3f6b0
--- /dev/null
+++ b/tests/ui/parser/do-not-suggest-semicolon-before-array.rs
@@ -0,0 +1,8 @@
+fn foo() {}
+
+fn bar() -> [u8; 2] {
+ foo()
+ [1, 3) //~ ERROR expected one of `.`, `?`, `]`, or an operator, found `,`
+}
+
+fn main() {}