about summary refs log tree commit diff
path: root/src/libcollections
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2015-03-10 23:13:40 -0500
committerJorge Aparicio <japaricious@gmail.com>2015-03-16 21:57:42 -0500
commit3ff84fc5fdd9509fc3ee4595fd76aa31d4815b2a (patch)
tree3e60a6c33bf7a8abea171cae5168ebb13c3cd137 /src/libcollections
parent8afcaabee32fb41eaf065041d7510c6762f12822 (diff)
downloadrust-3ff84fc5fdd9509fc3ee4595fd76aa31d4815b2a.tar.gz
rust-3ff84fc5fdd9509fc3ee4595fd76aa31d4815b2a.zip
impl {i,u}{8,16,32,64,size}
Diffstat (limited to 'src/libcollections')
-rw-r--r--src/libcollections/btree/node.rs7
-rw-r--r--src/libcollections/vec.rs1
-rw-r--r--src/libcollections/vec_deque.rs1
3 files changed, 7 insertions, 2 deletions
diff --git a/src/libcollections/btree/node.rs b/src/libcollections/btree/node.rs
index 1a8a4cb7e21..006d6bb040e 100644
--- a/src/libcollections/btree/node.rs
+++ b/src/libcollections/btree/node.rs
@@ -23,7 +23,7 @@ use core::iter::Zip;
 use core::marker::PhantomData;
 use core::ops::{Deref, DerefMut, Index, IndexMut};
 use core::ptr::Unique;
-use core::{slice, mem, ptr, cmp, num, raw};
+use core::{slice, mem, ptr, cmp, raw};
 use alloc::heap::{self, EMPTY};
 
 use borrow::Borrow;
@@ -105,7 +105,10 @@ struct MutNodeSlice<'a, K: 'a, V: 'a> {
 /// Fails if `target_alignment` is not a power of two.
 #[inline]
 fn round_up_to_next(unrounded: usize, target_alignment: usize) -> usize {
-    assert!(num::UnsignedInt::is_power_of_two(target_alignment));
+    #[cfg(stage0)]
+    use core::num::UnsignedInt;
+
+    assert!(target_alignment.is_power_of_two());
     (unrounded + target_alignment - 1) & !(target_alignment - 1)
 }
 
diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs
index 937df5494df..82d68caeb36 100644
--- a/src/libcollections/vec.rs
+++ b/src/libcollections/vec.rs
@@ -59,6 +59,7 @@ use core::intrinsics::assume;
 use core::iter::{repeat, FromIterator, IntoIterator};
 use core::marker::PhantomData;
 use core::mem;
+#[cfg(stage0)]
 use core::num::{Int, UnsignedInt};
 use core::ops::{Index, IndexMut, Deref, Add};
 use core::ops;
diff --git a/src/libcollections/vec_deque.rs b/src/libcollections/vec_deque.rs
index 43c9edcaa2b..65e44703df1 100644
--- a/src/libcollections/vec_deque.rs
+++ b/src/libcollections/vec_deque.rs
@@ -25,6 +25,7 @@ use core::default::Default;
 use core::fmt;
 use core::iter::{self, repeat, FromIterator, IntoIterator, RandomAccessIterator};
 use core::mem;
+#[cfg(stage0)]
 use core::num::{Int, UnsignedInt};
 use core::num::wrapping::WrappingOps;
 use core::ops::{Index, IndexMut};