]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/const_evaluatable_checked/simple_fail.rs
Auto merge of #86155 - alexcrichton:abort-on-unwind, r=nikomatsakis
[rust.git] / src / test / ui / const-generics / const_evaluatable_checked / simple_fail.rs
1 // revisions: full min
2 #![cfg_attr(full, feature(const_generics))]
3 #![cfg_attr(full, feature(const_evaluatable_checked))]
4 #![allow(incomplete_features)]
5
6 type Arr<const N: usize> = [u8; N - 1];
7 //[min]~^ ERROR generic parameters may not be used in const operations
8 //[full]~^^ ERROR evaluation of `Arr::<0_usize>::{constant#0}` failed
9
10 fn test<const N: usize>() -> Arr<N> where [u8; N - 1]: Sized {
11 //[min]~^ ERROR generic parameters may not be used in const operations
12 //[full]~^^ ERROR evaluation of `test::<0_usize>::{constant#0}` failed
13     todo!()
14 }
15
16 fn main() {
17     test::<0>();
18 }