about summary refs log tree commit diff
path: root/tests/ui/generic-const-items/unsatisfied-evaluatable-bounds.rs
blob: 13ce1f7de5bd67ab76178c136579420dc762c2d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![feature(generic_const_items, generic_const_exprs)]
#![allow(incomplete_features)]

// Ensure that we check if (makeshift) "evaluatable"-bounds on const items hold or not.

const POSITIVE<const N: usize>: usize = N
where
    [(); N - 1]:; //~ ERROR overflow

fn main() {
    let _ = POSITIVE::<0>;
}