summaryrefslogtreecommitdiffstats
path: root/src/test/ui/array-slice-vec/match_arr_unknown_len.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/array-slice-vec/match_arr_unknown_len.rs')
-rw-r--r--src/test/ui/array-slice-vec/match_arr_unknown_len.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/array-slice-vec/match_arr_unknown_len.rs b/src/test/ui/array-slice-vec/match_arr_unknown_len.rs
new file mode 100644
index 000000000..d190d7054
--- /dev/null
+++ b/src/test/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() {}