#[allow(dead_code)]
// only works on stage 1 when the rustc_layout_scalar_valid_range attribute actually exists
#[cfg(not(stage0))]
-static ASSERT: () = [()][(mem::size_of::<ScopeData>() != 4) as usize];
+static ASSERT: () = [()][!(mem::size_of::<ScopeData>() == 4) as usize];
#[allow(non_snake_case)]
impl Scope {
fn new(interners: &CtxtInterners<'tcx>) -> CommonTypes<'tcx> {
// Ensure our type representation does not grow
#[cfg(all(not(stage0), target_pointer_width = "64"))]
- assert!(mem::size_of::<ty::TyKind>() <= 24);
+ static ASSERT_TY_KIND: () = [()][!(std::mem::size_of::<ty::TyKind>() <= 24) as usize];
#[cfg(all(not(stage0), target_pointer_width = "64"))]
- assert!(mem::size_of::<ty::TyS>() <= 32);
+ static ASSERT_TYS: () = [()][!(std::mem::size_of::<ty::TyS>() <= 32) as usize];
let mk = |sty| CtxtInterners::intern_ty(interners, interners, sty);
let mk_region = |r| {