]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/const_evaluatable_checked/feature-gate-const_evaluatable_checked.rs
2 #![cfg_attr(full, feature(const_generics))]
3 #![cfg_attr(full, allow(incomplete_features))]
4 #![cfg_attr(min, feature(min_const_generics))]
6 type Arr
<const N
: usize> = [u8; N
- 1];
7 //[min]~^ ERROR generic parameters may not be used in const operations
9 fn test
<const N
: usize>() -> Arr
<N
> where Arr
<N
>: Default
{
10 //[full]~^ ERROR constant expression depends
16 assert_eq
!(x
, [0; 32]);