summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-02-04 08:47:27 +0000
committerbors <bors@rust-lang.org>2015-02-04 08:47:27 +0000
commitc3e1f77291803d26b2897c0953dce5cf7e70ab65 (patch)
tree83eb70740cacdf3d395976e85fed0b19c35dcc6e /src/libstd
parentd6c15d9b2daecdbe32eca894bda40c424798f5a0 (diff)
parentdf1ac7aa63ea89a067c57663eab035f7b83f6933 (diff)
downloadrust-c3e1f77291803d26b2897c0953dce5cf7e70ab65.tar.gz
rust-c3e1f77291803d26b2897c0953dce5cf7e70ab65.zip
Auto merge of #21892 - huonw:deprecate-rand, r=alexcrichton
Use [`rand`](https://crates.io/crates/rand) and [`derive_rand`](https://crates.io/crates/derive_rand) from crates.io.

[breaking-change]
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/hash/map.rs1
-rw-r--r--src/libstd/lib.rs2
-rw-r--r--src/libstd/num/strconv.rs1
-rw-r--r--src/libstd/old_io/fs.rs1
-rw-r--r--src/libstd/old_io/tempfile.rs1
-rw-r--r--src/libstd/os.rs2
-rw-r--r--src/libstd/rand/mod.rs3
-rw-r--r--src/libstd/sync/rwlock.rs2
8 files changed, 12 insertions, 1 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index 205eeb75b5b..63270610472 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -1593,6 +1593,7 @@ pub struct RandomState {
 impl RandomState {
     /// Construct a new `RandomState` that is initialized with random keys.
     #[inline]
+    #[allow(deprecated)]
     pub fn new() -> RandomState {
         let mut r = rand::thread_rng();
         RandomState { k0: r.gen(), k1: r.gen() }
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index a46cea7a443..14e779f9c4a 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -140,7 +140,7 @@ extern crate core;
 #[macro_reexport(vec)]
 extern crate "collections" as core_collections;
 
-extern crate "rand" as core_rand;
+#[allow(deprecated)] extern crate "rand" as core_rand;
 extern crate alloc;
 extern crate unicode;
 extern crate libc;
diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs
index 1d3bf484edb..9c4741b3ce3 100644
--- a/src/libstd/num/strconv.rs
+++ b/src/libstd/num/strconv.rs
@@ -459,6 +459,7 @@ mod tests {
 
 #[cfg(test)]
 mod bench {
+    #![allow(deprecated)] // rand
     extern crate test;
 
     mod uint {
diff --git a/src/libstd/old_io/fs.rs b/src/libstd/old_io/fs.rs
index 88ca6667d55..67e3fddfd05 100644
--- a/src/libstd/old_io/fs.rs
+++ b/src/libstd/old_io/fs.rs
@@ -822,6 +822,7 @@ fn access_string(access: FileAccess) -> &'static str {
 #[allow(unused_imports)]
 #[allow(unused_variables)]
 #[allow(unused_mut)]
+#[allow(deprecated)] // rand
 mod test {
     use prelude::v1::*;
     use old_io::{SeekSet, SeekCur, SeekEnd, Read, Open, ReadWrite, FileType};
diff --git a/src/libstd/old_io/tempfile.rs b/src/libstd/old_io/tempfile.rs
index a227116dfae..42317c7a2d4 100644
--- a/src/libstd/old_io/tempfile.rs
+++ b/src/libstd/old_io/tempfile.rs
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 //! Temporary files and directories
+#![allow(deprecated)] // rand
 
 use env;
 use iter::{IteratorExt};
diff --git a/src/libstd/os.rs b/src/libstd/os.rs
index 36122b16ea0..64f9e16aee4 100644
--- a/src/libstd/os.rs
+++ b/src/libstd/os.rs
@@ -1422,6 +1422,8 @@ mod arch_consts {
 
 #[cfg(test)]
 mod tests {
+    #![allow(deprecated)] // rand
+
     use prelude::v1::*;
 
     use iter::repeat;
diff --git a/src/libstd/rand/mod.rs b/src/libstd/rand/mod.rs
index cc72c5bed99..e52d5ada0ef 100644
--- a/src/libstd/rand/mod.rs
+++ b/src/libstd/rand/mod.rs
@@ -220,6 +220,9 @@
 //! ```
 
 #![unstable(feature = "rand")]
+#![deprecated(reason = "use the crates.io `rand` library instead",
+              since = "1.0.0-alpha")]
+#![allow(deprecated)]
 
 use cell::RefCell;
 use clone::Clone;
diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs
index 2dfc708e15b..6efbcf89415 100644
--- a/src/libstd/sync/rwlock.rs
+++ b/src/libstd/sync/rwlock.rs
@@ -383,6 +383,8 @@ impl<'a, T> Drop for RwLockWriteGuard<'a, T> {
 
 #[cfg(test)]
 mod tests {
+    #![allow(deprecated)] // rand
+
     use prelude::v1::*;
 
     use rand::{self, Rng};