Use assertion-like static assertions

This commit is contained in:
Oliver Schneider 2018-09-11 13:30:26 +02:00
parent 8053f6319a
commit 68298a5087
3 changed files with 4 additions and 4 deletions

View file

@ -1,5 +1,5 @@
// compile-pass
static ASSERT: () = [()][(std::mem::size_of::<u32>() != 4) as usize];
static ASSERT: () = [()][!(std::mem::size_of::<u32>() == 4) as usize];
fn main() {}