]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/coerce_unsized_array.rs
Add revisions to const generic type-dependent UI tests.
[rust.git] / src / test / ui / const-generics / coerce_unsized_array.rs
1 // run-pass
2 // revisions: full min
3
4 #![cfg_attr(full, feature(const_generics))]
5 #![cfg_attr(full, allow(incomplete_features))]
6 #![cfg_attr(min, feature(min_const_generics))]
7
8 fn foo<const N: usize>(v: &[u8; N]) -> &[u8] {
9     v
10 }
11
12 fn main() {
13     assert_eq!(foo(&[1, 2]), &[1, 2]);
14 }