summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/coerce_unsized_array.rs
blob: ffd5eb9d462eda0efe3be7b4f7ca7fed693256cb (plain)
1
2
3
4
5
6
7
8
// run-pass
fn foo<const N: usize>(v: &[u8; N]) -> &[u8] {
    v
}

fn main() {
    assert_eq!(foo(&[1, 2]), &[1, 2]);
}