summary refs log tree commit diff
path: root/src/test/ui/const-generics/issues/issue-73260.rs
blob: 04e4e9cd52b0063608dc8c912c4bcdafd81b732b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// compile-flags: -Zsave-analysis

#![feature(const_generics)]
#![allow(incomplete_features)]
struct Arr<const N: usize>
where Assert::<{N < usize::MAX / 2}>: IsTrue, //~ ERROR constant expression
{
}

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
}