allow unary operations and ignore StorageLive/Dead stmts

This commit is contained in:
Bastian Kauschke 2020-09-11 10:00:06 +02:00
parent 5a277822a5
commit d1294e0ce2
2 changed files with 37 additions and 4 deletions

View file

@ -0,0 +1,14 @@
// run-pass
#![feature(const_generics, const_evaluatable_checked)]
#![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>();
}