about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorFlorian Hartwig <florian.j.hartwig@gmail.com>2016-01-19 13:53:49 +0100
committerFlorian Hartwig <florian.j.hartwig@gmail.com>2016-01-19 13:53:49 +0100
commit6a4d77aa32a5a0c80264fa7d385707c4e1e45ffd (patch)
tree89cd2ef8cd2a1f57c006641934f4d4da29ee6fc8 /src
parent5623e9e601b323919479993cefaf28fd39d378e2 (diff)
downloadrust-6a4d77aa32a5a0c80264fa7d385707c4e1e45ffd.tar.gz
rust-6a4d77aa32a5a0c80264fa7d385707c4e1e45ffd.zip
Fix deprecation warning on latest nightly
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs2
-rw-r--r--src/types.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 4e13ba5c458..6c60d403e1c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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)]
 
diff --git a/src/types.rs b/src/types.rs
index 6289e13c85a..427b695d385 100644
--- a/src/types.rs
+++ b/src/types.rs
@@ -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
     }