summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/issues/issue-24375.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/issues/issue-24375.rs')
-rw-r--r--tests/ui/parser/issues/issue-24375.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/parser/issues/issue-24375.rs b/tests/ui/parser/issues/issue-24375.rs
new file mode 100644
index 000000000..1d128d33e
--- /dev/null
+++ b/tests/ui/parser/issues/issue-24375.rs
@@ -0,0 +1,9 @@
+static tmp : [&'static str; 2] = ["hello", "he"];
+
+fn main() {
+ let z = "hello";
+ match z {
+ tmp[0] => {} //~ ERROR expected one of `=>`, `@`, `if`, or `|`, found `[`
+ _ => {}
+ }
+}