1 // compile-flags: -Zsave-analysis
3 #![feature(const_generics)]
4 #![allow(incomplete_features)]
5 struct Arr<const N: usize>
6 where Assert::<{N < usize::max_value() / 2}>: IsTrue, //~ ERROR constant expression
10 enum Assert<const CHECK: bool> {}
14 impl IsTrue for Assert<true> {}
17 let x: Arr<{usize::max_value()}> = Arr {};
18 //~^ ERROR mismatched types
19 //~| ERROR mismatched types