We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0ed76b4 + 50d35c1 commit 02e4eefCopy full SHA for 02e4eef
tests/ui/const-generics/issues/issue-105821.rs
@@ -0,0 +1,23 @@
1
+// check-pass
2
+
3
+#![allow(incomplete_features)]
4
+#![feature(adt_const_params, const_ptr_read, generic_const_exprs)]
5
+#![allow(dead_code)]
6
7
+const fn catone<const M: usize>(_a: &[u8; M]) -> [u8; M + 1]
8
+where
9
+ [(); M + 1]:,
10
+{
11
+ unimplemented!()
12
+}
13
14
+struct Catter<const A: &'static [u8]>;
15
+impl<const A: &'static [u8]> Catter<A>
16
17
+ [(); A.len() + 1]:,
18
19
+ const ZEROS: &'static [u8; A.len()] = &[0_u8; A.len()];
20
+ const R: &'static [u8] = &catone(Self::ZEROS);
21
22
23
+fn main() {}
0 commit comments