]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/issues/issue-73260.rs
Rollup merge of #106427 - mejrs:translation_errors, r=davidtwco
[rust.git] / tests / ui / const-generics / issues / issue-73260.rs
1 // compile-flags: -Zsave-analysis
2 #![feature(generic_const_exprs)]
3 #![allow(incomplete_features)]
4 struct Arr<const N: usize>
5 where
6     Assert::<{N < usize::MAX / 2}>: IsTrue,
7 {}
8
9 enum Assert<const CHECK: bool> {}
10
11 trait IsTrue {}
12
13 impl IsTrue for Assert<true> {}
14
15 fn main() {
16     let x: Arr<{usize::MAX}> = Arr {};
17     //~^ ERROR mismatched types
18     //~| ERROR mismatched types
19 }