about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/Cargo.toml3
-rw-r--r--src/liballoc/lib.rs2
-rw-r--r--src/liballoc/linked_list.rs3
-rw-r--r--src/liballoc/tests/lib.rs1
-rw-r--r--src/liballoc/tests/slice.rs3
5 files changed, 10 insertions, 2 deletions
diff --git a/src/liballoc/Cargo.toml b/src/liballoc/Cargo.toml
index 686e5681d12..0a265ee1376 100644
--- a/src/liballoc/Cargo.toml
+++ b/src/liballoc/Cargo.toml
@@ -11,6 +11,9 @@ path = "lib.rs"
 core = { path = "../libcore" }
 std_unicode = { path = "../libstd_unicode" }
 
+[dev-dependencies]
+rand = "0.3"
+
 [[test]]
 name = "collectionstests"
 path = "../liballoc/tests/lib.rs"
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs
index a40ed060604..3cc3ea46796 100644
--- a/src/liballoc/lib.rs
+++ b/src/liballoc/lib.rs
@@ -135,6 +135,8 @@
 extern crate std;
 #[cfg(test)]
 extern crate test;
+#[cfg(test)]
+extern crate rand;
 
 extern crate std_unicode;
 
diff --git a/src/liballoc/linked_list.rs b/src/liballoc/linked_list.rs
index f897feb7afa..fac6acaca61 100644
--- a/src/liballoc/linked_list.rs
+++ b/src/liballoc/linked_list.rs
@@ -1269,10 +1269,11 @@ unsafe impl<'a, T: Sync> Sync for IterMut<'a, T> {}
 
 #[cfg(test)]
 mod tests {
-    use std::__rand::{thread_rng, Rng};
     use std::thread;
     use std::vec::Vec;
 
+    use rand::{thread_rng, Rng};
+
     use super::{LinkedList, Node};
 
     #[cfg(test)]
diff --git a/src/liballoc/tests/lib.rs b/src/liballoc/tests/lib.rs
index c5beb63d12e..00ebd88d464 100644
--- a/src/liballoc/tests/lib.rs
+++ b/src/liballoc/tests/lib.rs
@@ -30,6 +30,7 @@
 #![feature(unicode)]
 
 extern crate std_unicode;
+extern crate rand;
 
 use std::hash::{Hash, Hasher};
 use std::collections::hash_map::DefaultHasher;
diff --git a/src/liballoc/tests/slice.rs b/src/liballoc/tests/slice.rs
index c53bf15f1bf..85d5ce304b8 100644
--- a/src/liballoc/tests/slice.rs
+++ b/src/liballoc/tests/slice.rs
@@ -10,9 +10,10 @@
 
 use std::cmp::Ordering::{Equal, Greater, Less};
 use std::mem;
-use std::__rand::{Rng, thread_rng};
 use std::rc::Rc;
 
+use rand::{Rng, thread_rng};
+
 fn square(n: usize) -> usize {
     n * n
 }