]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/coerce_unsized_array.rs
Rollup merge of #105843 - compiler-errors:sugg-const, r=lcnr
[rust.git] / src / test / ui / const-generics / coerce_unsized_array.rs
1 // run-pass
2 fn foo<const N: usize>(v: &[u8; N]) -> &[u8] {
3     v
4 }
5
6 fn main() {
7     assert_eq!(foo(&[1, 2]), &[1, 2]);
8 }