2020-09-11 11:42:32 +02:00
|
|
|
// revisions: full min
|
|
|
|
#![cfg_attr(full, feature(const_generics))]
|
2021-08-25 10:21:39 +01:00
|
|
|
#![cfg_attr(full, feature(generic_const_exprs))]
|
2020-09-10 08:52:02 +02:00
|
|
|
#![allow(incomplete_features)]
|
|
|
|
|
2021-05-27 22:42:07 +02:00
|
|
|
type Arr<const N: usize> = [u8; N - 1];
|
2020-10-12 22:27:59 +01:00
|
|
|
//[min]~^ ERROR generic parameters may not be used in const operations
|
2021-05-27 22:42:07 +02:00
|
|
|
//[full]~^^ ERROR evaluation of `Arr::<0_usize>::{constant#0}` failed
|
2020-09-10 08:52:02 +02:00
|
|
|
|
2021-01-27 13:28:52 +01:00
|
|
|
fn test<const N: usize>() -> Arr<N> where [u8; N - 1]: Sized {
|
|
|
|
//[min]~^ ERROR generic parameters may not be used in const operations
|
2021-05-27 22:42:07 +02:00
|
|
|
//[full]~^^ ERROR evaluation of `test::<0_usize>::{constant#0}` failed
|
2020-09-10 08:52:02 +02:00
|
|
|
todo!()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
test::<0>();
|
|
|
|
}
|