about summary refs log tree commit diff
path: root/tests/ui/array-slice-vec/match_arr_unknown_len.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/array-slice-vec/match_arr_unknown_len.rs')
-rw-r--r--tests/ui/array-slice-vec/match_arr_unknown_len.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/array-slice-vec/match_arr_unknown_len.rs b/tests/ui/array-slice-vec/match_arr_unknown_len.rs
new file mode 100644
index 00000000000..d190d7054fe
--- /dev/null
+++ b/tests/ui/array-slice-vec/match_arr_unknown_len.rs
@@ -0,0 +1,8 @@
+fn is_123<const N: usize>(x: [u32; N]) -> bool {
+    match x {
+        [1, 2] => true, //~ ERROR mismatched types
+        _ => false
+    }
+}
+
+fn main() {}