We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1ed74ee + 49b1971 commit 157975cCopy full SHA for 157975c
src/test/ui/const-generics/coerce_unsized_array.rs
@@ -0,0 +1,11 @@
1
+// run-pass
2
+#![feature(const_generics)]
3
+#![allow(incomplete_features)]
4
+
5
+fn foo<const N: usize>(v: &[u8; N]) -> &[u8] {
6
+ v
7
+}
8
9
+fn main() {
10
+ assert_eq!(foo(&[1, 2]), &[1, 2]);
11
0 commit comments