2020-09-11 03:00:06 -05:00
|
|
|
// run-pass
|
2021-08-27 11:04:57 -05:00
|
|
|
#![feature(generic_const_exprs)]
|
2020-09-11 03:00:06 -05:00
|
|
|
#![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>();
|
|
|
|
}
|