]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/generic_const_exprs/unop.rs
Rollup merge of #106648 - Nilstrieb:poly-cleanup, r=compiler-errors
[rust.git] / tests / ui / const-generics / generic_const_exprs / unop.rs
1 // run-pass
2 #![feature(generic_const_exprs)]
3 #![allow(incomplete_features)]
4
5 struct Foo<const B: bool>;
6
7 fn test<const N: usize>() -> Foo<{ !(N > 10) }> where Foo<{ !(N > 10) }>: Sized {
8     Foo
9 }
10
11 fn main() {
12     let _: Foo<false> = test::<12>();
13     let _: Foo<true> = test::<9>();
14 }