diff options
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 1 | ||||
| -rw-r--r-- | src/libstd/lib.rs | 2 | ||||
| -rw-r--r-- | src/libstd/num/strconv.rs | 1 | ||||
| -rw-r--r-- | src/libstd/old_io/fs.rs | 1 | ||||
| -rw-r--r-- | src/libstd/old_io/tempfile.rs | 1 | ||||
| -rw-r--r-- | src/libstd/os.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rand/mod.rs | 3 | ||||
| -rw-r--r-- | src/libstd/sync/rwlock.rs | 2 |
8 files changed, 12 insertions, 1 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index 3e2c7627dbe..449c8a9e5dc 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1566,6 +1566,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 96aebb735ef..21197f639ad 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -142,7 +142,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 0a9aeb849be..82ede30cb91 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 20cbde5db71..d2c3a8e60ad 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 old_io::{fs, IoError, IoErrorKind, IoResult}; use old_io; diff --git a/src/libstd/os.rs b/src/libstd/os.rs index 600ca60349a..7a9f61f1d64 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -1425,6 +1425,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 211abc2fc83..48ff6db4392 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 95b570dd9c8..63ca5b5669a 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}; |
