summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/issues/issue-73260.rs
blob: d762f9c8b2620c1629bd917a5f049a0e7afffb62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// compile-flags: -Zsave-analysis
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]
struct Arr<const N: usize>
where
    Assert::<{N < usize::MAX / 2}>: IsTrue,
{}

enum Assert<const CHECK: bool> {}

trait IsTrue {}

impl IsTrue for Assert<true> {}

fn main() {
    let x: Arr<{usize::MAX}> = Arr {};
    //~^ ERROR mismatched types
    //~| ERROR mismatched types
}