about summary refs log tree commit diff
path: root/tests/ui/const-generics/generic_const_exprs/unop.rs
blob: c8eb3deba6075ace02f8adb97e6be9103c9e8d63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//@ run-pass
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]

struct Foo<const B: bool>;

fn test<const N: usize>() -> Foo<{ !(N > 10) }> where Foo<{ !(N > 10) }>: Sized {
    Foo
}

fn main() {
    let _: Foo<false> = test::<12>();
    let _: Foo<true> = test::<9>();
}