]> git.lizzy.rs Git - rust.git/commitdiff
Silence dead code warning for the assertion statics
authorOliver Schneider <github35764891676564198441@oli-obk.de>
Tue, 11 Sep 2018 12:24:19 +0000 (14:24 +0200)
committerOliver Schneider <github35764891676564198441@oli-obk.de>
Tue, 11 Sep 2018 12:24:19 +0000 (14:24 +0200)
src/librustc/ty/context.rs

index eaa1c5d018929e21c7d95595ce0fbfac8ab3d0c1..1a7c1b3eef88bc429d86fe38b20d9fdc252563c8 100644 (file)
@@ -830,8 +830,10 @@ 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"))]
+        #[allow(dead_code)]
         static ASSERT_TY_KIND: () = [()][!(::std::mem::size_of::<ty::TyKind>() <= 24) as usize];
         #[cfg(all(not(stage0), target_pointer_width = "64"))]
+        #[allow(dead_code)]
         static ASSERT_TYS: () = [()][!(::std::mem::size_of::<ty::TyS>() <= 32) as usize];
 
         let mk = |sty| CtxtInterners::intern_ty(interners, interners, sty);