1 // Regression test for #72819: ICE due to failure in resolving the const generic in `Arr`'s type
4 #![cfg_attr(full, feature(const_generics))]
5 #![cfg_attr(full, allow(incomplete_features))]
6 #![cfg_attr(min, feature(min_const_generics))]
8 struct Arr<const N: usize>
9 where Assert::<{N < usize::MAX / 2}>: IsTrue,
10 //[full]~^ ERROR constant expression depends on a generic parameter
11 //[min]~^^ ERROR generic parameters may not be used in const operations
15 enum Assert<const CHECK: bool> {}
19 impl IsTrue for Assert<true> {}
22 let x: Arr<{usize::MAX}> = Arr {};