]> git.lizzy.rs Git - rust.git/commitdiff
Fix deprecation warning on latest nightly
authorFlorian Hartwig <florian.j.hartwig@gmail.com>
Tue, 19 Jan 2016 12:53:49 +0000 (13:53 +0100)
committerFlorian Hartwig <florian.j.hartwig@gmail.com>
Tue, 19 Jan 2016 12:53:49 +0000 (13:53 +0100)
src/lib.rs
src/types.rs

index 4e13ba5c45838b72c82f3e80b6b6e9fd02a17390..6c60d403e1cb4c9db5eba5ae44a41d2f16937ac4 100644 (file)
@@ -1,6 +1,6 @@
 #![feature(plugin_registrar, box_syntax)]
 #![feature(rustc_private, collections)]
-#![feature(num_bits_bytes, iter_arith)]
+#![feature(iter_arith)]
 #![feature(custom_attribute)]
 #![allow(unknown_lints)]
 
index 6289e13c85aec09ee05f6207aead226ed59e4fef..427b695d3857f993d32bba8016c5d09fc18d9d51 100644 (file)
@@ -209,7 +209,7 @@ fn int_ty_to_nbits(typ: &ty::TyS) -> usize {
     };
     // n == 4 is the usize/isize case
     if n == 4 {
-        ::std::usize::BITS
+        ::std::mem::size_of::<usize>() * 8
     } else {
         n
     }