summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/infer_arr_len_from_pat.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-generics/infer_arr_len_from_pat.rs')
-rw-r--r--src/test/ui/const-generics/infer_arr_len_from_pat.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/infer_arr_len_from_pat.rs b/src/test/ui/const-generics/infer_arr_len_from_pat.rs
new file mode 100644
index 000000000..40f6f5b8d
--- /dev/null
+++ b/src/test/ui/const-generics/infer_arr_len_from_pat.rs
@@ -0,0 +1,11 @@
+// check-pass
+//
+// see issue #70529
+
+fn as_chunks<const N: usize>() -> [u8; N] {
+ loop {}
+}
+
+fn main() {
+ let [_, _] = as_chunks();
+}