]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/generic_const_exprs/simple_fail.rs
Move /src/test to /tests
[rust.git] / tests / ui / const-generics / generic_const_exprs / simple_fail.rs
1 #![feature(generic_const_exprs)]
2 #![allow(incomplete_features)]
3
4 type Arr<const N: usize> = [u8; N - 1];
5 //~^ ERROR evaluation of `Arr::<0>::{constant#0}` failed
6
7 fn test<const N: usize>() -> Arr<N>
8 where
9     [u8; N - 1]: Sized,
10     //~^ ERROR evaluation of `test::<0>::{constant#0}` failed
11 {
12     todo!()
13 }
14
15 fn main() {
16     test::<0>();
17 }