Skip to content

Commit

Permalink
Properly access std::mem::size_of
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Sep 11, 2018
1 parent 5f42a0f commit f3417c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustc/ty/context.rs
Expand Up @@ -830,9 +830,9 @@ impl<'tcx> CommonTypes<'tcx> {
fn new(interners: &CtxtInterners<'tcx>) -> CommonTypes<'tcx> {
// Ensure our type representation does not grow
#[cfg(all(not(stage0), target_pointer_width = "64"))]
static ASSERT_TY_KIND: () = [()][!(std::mem::size_of::<ty::TyKind>() <= 24) as usize];
static ASSERT_TY_KIND: () = [()][!(::std::mem::size_of::<ty::TyKind>() <= 24) as usize];
#[cfg(all(not(stage0), target_pointer_width = "64"))]
static ASSERT_TYS: () = [()][!(std::mem::size_of::<ty::TyS>() <= 32) as usize];
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| {
Expand Down

0 comments on commit f3417c5

Please sign in to comment.