rust/tests/ui/const-generics/coerce_unsized_array.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
121 B
Rust
Raw Normal View History

2020-07-23 03:55:20 -05:00
// run-pass
fn foo<const N: usize>(v: &[u8; N]) -> &[u8] {
v
}
fn main() {
assert_eq!(foo(&[1, 2]), &[1, 2]);
}