]> git.lizzy.rs Git - rust.git/commitdiff
Update users for the std::rand -> librand move.
authorHuon Wilson <dbau.pp+github@gmail.com>
Sun, 2 Mar 2014 00:33:24 +0000 (11:33 +1100)
committerHuon Wilson <dbau.pp+github@gmail.com>
Wed, 12 Mar 2014 00:31:43 +0000 (11:31 +1100)
70 files changed:
src/doc/guide-tasks.md
src/doc/tutorial.md
src/etc/generate-deriving-span-tests.py
src/libcollections/bitv.rs
src/libcollections/deque.rs
src/libcollections/dlist.rs
src/libcollections/hashmap.rs
src/libcollections/lib.rs
src/libcollections/treemap.rs
src/libcollections/trie.rs
src/libextra/lib.rs
src/libextra/tempfile.rs
src/libflate/lib.rs
src/libgreen/lib.rs
src/libgreen/sched.rs
src/libnum/bigint.rs
src/libnum/lib.rs
src/librustc/util/sha2.rs
src/libserialize/base64.rs
src/libsync/arc.rs
src/libsyntax/ext/deriving/generic.rs
src/libuuid/lib.rs
src/test/bench/core-map.rs
src/test/bench/core-set.rs
src/test/bench/core-std.rs
src/test/bench/noise.rs
src/test/compile-fail/box-static-bound.rs
src/test/compile-fail/deriving-span-Clone-enum-struct-variant.rs
src/test/compile-fail/deriving-span-Clone-enum.rs
src/test/compile-fail/deriving-span-Clone-struct.rs
src/test/compile-fail/deriving-span-Clone-tuple-struct.rs
src/test/compile-fail/deriving-span-Default-struct.rs
src/test/compile-fail/deriving-span-Default-tuple-struct.rs
src/test/compile-fail/deriving-span-Eq-enum-struct-variant.rs
src/test/compile-fail/deriving-span-Eq-enum.rs
src/test/compile-fail/deriving-span-Eq-struct.rs
src/test/compile-fail/deriving-span-Eq-tuple-struct.rs
src/test/compile-fail/deriving-span-Hash-enum-struct-variant.rs
src/test/compile-fail/deriving-span-Hash-enum.rs
src/test/compile-fail/deriving-span-Hash-struct.rs
src/test/compile-fail/deriving-span-Hash-tuple-struct.rs
src/test/compile-fail/deriving-span-Ord-enum-struct-variant.rs
src/test/compile-fail/deriving-span-Ord-enum.rs
src/test/compile-fail/deriving-span-Ord-struct.rs
src/test/compile-fail/deriving-span-Ord-tuple-struct.rs
src/test/compile-fail/deriving-span-Rand-enum-struct-variant.rs
src/test/compile-fail/deriving-span-Rand-enum.rs
src/test/compile-fail/deriving-span-Rand-struct.rs
src/test/compile-fail/deriving-span-Rand-tuple-struct.rs
src/test/compile-fail/deriving-span-Show-enum-struct-variant.rs
src/test/compile-fail/deriving-span-Show-enum.rs
src/test/compile-fail/deriving-span-Show-struct.rs
src/test/compile-fail/deriving-span-Show-tuple-struct.rs
src/test/compile-fail/deriving-span-TotalEq-enum-struct-variant.rs
src/test/compile-fail/deriving-span-TotalEq-enum.rs
src/test/compile-fail/deriving-span-TotalEq-struct.rs
src/test/compile-fail/deriving-span-TotalEq-tuple-struct.rs
src/test/compile-fail/deriving-span-TotalOrd-enum-struct-variant.rs
src/test/compile-fail/deriving-span-TotalOrd-enum.rs
src/test/compile-fail/deriving-span-TotalOrd-struct.rs
src/test/compile-fail/deriving-span-TotalOrd-tuple-struct.rs
src/test/compile-fail/deriving-span-Zero-struct.rs
src/test/compile-fail/deriving-span-Zero-tuple-struct.rs
src/test/run-make/unicode-input/multiple_files.rs
src/test/run-make/unicode-input/span_length.rs
src/test/run-pass/deriving-encodable-decodable.rs
src/test/run-pass/deriving-global.rs
src/test/run-pass/deriving-rand.rs
src/test/run-pass/morestack6.rs
src/test/run-pass/vector-sort-failure-safe.rs

index 0d27071494fea1b2c7f4184e46c69d1c3795d2a6..e20baa32c1a9a9ce21ebc3551abc6248ef489bf5 100644 (file)
@@ -50,13 +50,13 @@ concurrency at this writing:
 * [`sync::DuplexStream`] - An extension of `pipes::stream` that allows both sending and receiving,
 * [`sync::SyncChan`] - An extension of `pipes::stream` that provides synchronous message sending,
 * [`sync::SyncPort`] - An extension of `pipes::stream` that acknowledges each message received,
-* [`sync::rendezvous`] - Creates a stream whose channel, upon sending a message, blocks until the 
+* [`sync::rendezvous`] - Creates a stream whose channel, upon sending a message, blocks until the
     message is received.
 * [`sync::Arc`] - The Arc (atomically reference counted) type, for safely sharing immutable data,
 * [`sync::RWArc`] - A dual-mode Arc protected by a reader-writer lock,
 * [`sync::MutexArc`] - An Arc with mutable data protected by a blocking mutex,
 * [`sync::Semaphore`] - A counting, blocking, bounded-waiting semaphore,
-* [`sync::Mutex`] - A blocking, bounded-waiting, mutual exclusion lock with an associated 
+* [`sync::Mutex`] - A blocking, bounded-waiting, mutual exclusion lock with an associated
     FIFO condition variable,
 * [`sync::RWLock`] - A blocking, no-starvation, reader-writer lock with an associated condvar,
 * [`sync::Barrier`] - A barrier enables multiple tasks to synchronize the beginning
@@ -343,8 +343,8 @@ a single large vector of floats. Each task needs the full vector to perform its
 
 ~~~
 # extern crate sync;
+ extern crate rand;
 # use std::vec;
-# use std::rand;
 use sync::Arc;
 
 fn pnorm(nums: &~[f64], p: uint) -> f64 {
@@ -376,9 +376,9 @@ created by the line
 
 ~~~
 # extern crate sync;
+# extern crate rand;
 # use sync::Arc;
 # use std::vec;
-# use std::rand;
 # fn main() {
 # let numbers = vec::from_fn(1000000, |_| rand::random::<f64>());
 let numbers_arc=Arc::new(numbers);
@@ -389,9 +389,9 @@ and a clone of it is sent to each task
 
 ~~~
 # extern crate sync;
+# extern crate rand;
 # use sync::Arc;
 # use std::vec;
-# use std::rand;
 # fn main() {
 # let numbers=vec::from_fn(1000000, |_| rand::random::<f64>());
 # let numbers_arc = Arc::new(numbers);
@@ -406,9 +406,9 @@ Each task recovers the underlying data by
 
 ~~~
 # extern crate sync;
+# extern crate rand;
 # use sync::Arc;
 # use std::vec;
-# use std::rand;
 # fn main() {
 # let numbers=vec::from_fn(1000000, |_| rand::random::<f64>());
 # let numbers_arc=Arc::new(numbers);
index de3f39ef81d15038ae8f67a51b75c69838b71d8f..8f37aecfc34c2edd8227e5d1a14dd86a4a267b7d 100644 (file)
@@ -2529,7 +2529,7 @@ of type `ABC` can be randomly generated and converted to a string:
 #[deriving(Eq)]
 struct Circle { radius: f64 }
 
-#[deriving(Rand, Show)]
+#[deriving(Clone, Show)]
 enum ABC { A, B, C }
 ~~~
 
index cf895d2b6dee5f47ef66ffd3aad3560023d0316a..260c1c8912475f7f7a850ae177c182100e5b73ea 100755 (executable)
@@ -39,6 +39,7 @@ TEMPLATE = """// Copyright {year} The Rust Project Developers. See the COPYRIGHT
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 {error_deriving}
 struct Error;
index 116bb80d8c077389e6906a812818168855c63429..87e9c3f238ad50d4cf6452dd2abe265471a7e8e7 100644 (file)
@@ -947,8 +947,8 @@ mod tests {
 
     use std::uint;
     use std::vec;
-    use std::rand;
-    use std::rand::Rng;
+    use rand;
+    use rand::Rng;
 
     static BENCH_BITS : uint = 1 << 14;
 
index ac3861f4e3668ac8b7c44916efc0d764b7d334aa..f84354f9b009db98c058eff36b574919349f2291 100644 (file)
@@ -44,8 +44,9 @@ pub mod bench {
     extern crate test;
     use self::test::BenchHarness;
     use std::container::MutableMap;
-    use std::{vec, rand};
-    use std::rand::Rng;
+    use std::vec;
+    use rand;
+    use rand::Rng;
 
     pub fn insert_rand_n<M:MutableMap<uint,uint>>(n: uint,
                                                   map: &mut M,
index 9193d31931067da76c6aa4c480c1e1e3577b6d7d..a3b65609b0a37a67e2337a6b05143101777ed9ba 100644 (file)
@@ -633,7 +633,7 @@ mod tests {
     extern crate test;
     use self::test::BenchHarness;
     use deque::Deque;
-    use std::rand;
+    use rand;
     use super::{DList, Node, ListInsertion};
 
     pub fn check_links<T>(list: &DList<T>) {
index 1d73fae11b09bc62b1e7c690c8dba0665cfabbf8..4a9f95dcb724de8c75d254742d1d494b288828f2 100644 (file)
@@ -61,8 +61,8 @@
 use std::iter;
 use std::mem::replace;
 use std::num;
-use std::rand::Rng;
-use std::rand;
+use rand::Rng;
+use rand;
 use std::vec::{Items, MutItems};
 use std::vec_ng::Vec;
 use std::vec_ng;
index fb8cd61b703883a4632dff4910e31a9974764ee3..a087180d9a50277f4729c550e34f83b220f6d1d5 100644 (file)
@@ -23,6 +23,8 @@
 #[allow(unrecognized_lint)];
 #[allow(default_type_param_usage)];
 
+extern crate rand;
+
 #[cfg(test)] extern crate test;
 
 pub use bitv::Bitv;
index 6388b4c7c521d45eae0e7e3a7741722e55fa87fc..5965417bac71b952f6d4481be4dbc2e53e5f7ddc 100644 (file)
@@ -1009,8 +1009,8 @@ mod test_treemap {
 
     use super::{TreeMap, TreeNode};
 
-    use std::rand::Rng;
-    use std::rand;
+    use rand::Rng;
+    use rand;
 
     #[test]
     fn find_empty() {
index 5d285e7d29e6f6f295a59fa1b7010f3218154772..2232af98eb311971d9ec4d3e26effd43a6745f2b 100644 (file)
@@ -898,7 +898,7 @@ fn test_mut_bound() {
 mod bench_map {
     extern crate test;
     use super::TrieMap;
-    use std::rand::{weak_rng, Rng};
+    use rand::{weak_rng, Rng};
     use self::test::BenchHarness;
 
     #[bench]
index 6861f527b1d0b006b46074a0fbb7336f9ae02e15..673eb7e76de492e50fe4ba5ac24a7711f1e3889d 100644 (file)
 #[deny(non_camel_case_types)];
 #[deny(missing_doc)];
 
-extern crate sync;
-extern crate serialize;
 extern crate collections;
+extern crate rand;
+extern crate serialize;
+extern crate sync;
 extern crate time;
 
 // Utility modules
index 5948f356a651d6c0384c691dded84ae711261daf..4e4d80ae292cfb57bcce3cbb718f2ee51f5af3d1 100644 (file)
@@ -12,8 +12,8 @@
 
 
 use std::os;
-use std::rand::Rng;
-use std::rand;
+use rand::Rng;
+use rand;
 use std::io;
 use std::io::fs;
 
index 1a14432be6a3af11fd88752d56b15c42ba452e94..17c96f1c5aba9a16acb2dd557e0646e6694ecacc 100644 (file)
@@ -90,9 +90,10 @@ pub fn inflate_bytes_zlib(bytes: &[u8]) -> CVec<u8> {
 
 #[cfg(test)]
 mod tests {
+    extern crate rand;
+
     use super::{inflate_bytes, deflate_bytes};
-    use std::rand;
-    use std::rand::Rng;
+    use self::rand::Rng;
 
     #[test]
     fn test_flate_round_trip() {
index 59477b6734ad94eb28d7d8410e1ede938563803f..22dd4c74936b451db698aea49696e30e0eef0aaf 100644 (file)
 #[feature(macro_rules)];
 #[allow(visible_private_types)];
 
+extern crate rand;
+
 use std::mem::replace;
 use std::os;
 use std::rt::crate_map;
index a128ee4a25027a8cf6881aebf81d781aefeadbba..aae0034263e373b8e99b5e7a55ec6d79836368b2 100644 (file)
@@ -9,7 +9,6 @@
 // except according to those terms.
 
 use std::cast;
-use std::rand::{XorShiftRng, Rng, Rand};
 use std::rt::local::Local;
 use std::rt::rtio::{RemoteCallback, PausableIdleCallback, Callback, EventLoop};
 use std::rt::task::BlockedTask;
@@ -18,6 +17,8 @@
 use std::unstable::mutex::NativeMutex;
 use std::raw;
 
+use rand::{XorShiftRng, Rng, Rand};
+
 use TaskState;
 use context::Context;
 use coroutine::Coroutine;
@@ -957,7 +958,7 @@ fn new_sched_rng() -> XorShiftRng {
 fn new_sched_rng() -> XorShiftRng {
     use std::libc;
     use std::mem;
-    use std::rand::SeedableRng;
+    use rand::SeedableRng;
 
     let fd = "/dev/urandom".with_c_str(|name| {
         unsafe { libc::open(name, libc::O_RDONLY, 0) }
index ea8720751d8b0f1c6bb4eabf0ad6bf4694096b05..c6203b3f234c98fbffa0a0273cbe83c65f4d170b 100644 (file)
@@ -24,7 +24,7 @@
 use std::num::CheckedDiv;
 use std::num::{Bitwise, ToPrimitive, FromPrimitive};
 use std::num::{Zero, One, ToStrRadix, FromStrRadix};
-use std::rand::Rng;
+use rand::Rng;
 use std::str;
 use std::uint;
 use std::vec;
@@ -1470,7 +1470,7 @@ mod biguint_tests {
     use std::num::{Zero, One, FromStrRadix, ToStrRadix};
     use std::num::{ToPrimitive, FromPrimitive};
     use std::num::CheckedDiv;
-    use std::rand::{task_rng};
+    use rand::{task_rng};
     use std::str;
     use std::u64;
     use std::vec;
@@ -2205,7 +2205,7 @@ mod bigint_tests {
     use std::num::CheckedDiv;
     use std::num::{Zero, One, FromStrRadix, ToStrRadix};
     use std::num::{ToPrimitive, FromPrimitive};
-    use std::rand::{task_rng};
+    use rand::{task_rng};
     use std::u64;
 
     #[test]
index 8e42b01f14ccbe7a02ae8f95a4e1f8b3c2f5697f..8ff042ba3621ca94e3850d23349fc1f5805f9913 100644 (file)
@@ -15,6 +15,8 @@
 #[crate_type = "dylib"];
 #[license = "MIT/ASL2"];
 
+extern crate rand;
+
 pub mod bigint;
 pub mod rational;
 pub mod complex;
index c5e75b52bf33c819a8457cb2204d7fdcbcba5fc1..5dbebbb4db1719e1f119c882d6f0e7f51dad39e7 100644 (file)
@@ -524,12 +524,14 @@ fn output_bits(&self) -> uint { 256 }
 
 #[cfg(test)]
 mod tests {
+    extern crate rand;
+
     use super::{Digest, Sha256, FixedBuffer};
     use std::num::Bounded;
     use std::vec;
     use std::vec_ng::Vec;
-    use std::rand::isaac::IsaacRng;
-    use std::rand::Rng;
+    use self::rand::isaac::IsaacRng;
+    use self::rand::Rng;
     use serialize::hex::FromHex;
 
     // A normal addition - no overflow occurs
index ea9a922f2244f27492a95a3aac887f8154251666..a09b03ec58a2edb8547b1ff48063cec2909eb4b9 100644 (file)
@@ -263,6 +263,7 @@ fn from_base64(&self) -> Result<~[u8], FromBase64Error> {
 #[cfg(test)]
 mod tests {
     extern crate test;
+    extern crate rand;
     use self::test::BenchHarness;
     use base64::{Config, FromBase64, ToBase64, STANDARD, URL_SAFE};
 
@@ -335,7 +336,7 @@ fn test_from_base64_invalid_padding() {
 
     #[test]
     fn test_base64_random() {
-        use std::rand::{task_rng, random, Rng};
+        use self::rand::{task_rng, random, Rng};
         use std::vec;
 
         for _ in range(0, 1000) {
index 17a35f331705d2bc29153213fc9f77cca9034dd3..b50d527e3f596c8f0e7ec16c3f28257ff743f4d8 100644 (file)
  * With simple pipes, without Arc, a copy would have to be made for each task.
  *
  * ```rust
+ * extern crate sync;
+ * extern crate rand;
  * use sync::Arc;
- * use std::{rand, vec};
+ * use std::vec;
  *
- * let numbers = vec::from_fn(100, |i| (i as f32) * rand::random());
- * let shared_numbers = Arc::new(numbers);
+ * fn main() {
+ *     let numbers = vec::from_fn(100, |i| (i as f32) * rand::random());
+ *     let shared_numbers = Arc::new(numbers);
  *
- *   for _ in range(0, 10) {
- *       let (port, chan) = Chan::new();
- *       chan.send(shared_numbers.clone());
+ *     for _ in range(0, 10) {
+ *         let (port, chan) = Chan::new();
+ *         chan.send(shared_numbers.clone());
  *
- *       spawn(proc() {
- *           let shared_numbers = port.recv();
- *           let local_numbers = shared_numbers.get();
+ *         spawn(proc() {
+ *             let shared_numbers = port.recv();
+ *             let local_numbers = shared_numbers.get();
  *
- *           // Work with the local numbers
- *       });
- *   }
+ *             // Work with the local numbers
+ *         });
+ *     }
+ * }
  * ```
  */
 
index 1dc474551cf7c03127c73dbdd8740fa6f2e8dd19..bc314bc204bec9e08046890ac68722bda271af2f 100644 (file)
@@ -216,7 +216,7 @@ pub struct TraitDef<'a> {
 pub struct MethodDef<'a> {
     /// name of the method
     name: &'a str,
-    /// List of generics, e.g. `R: std::rand::Rng`
+    /// List of generics, e.g. `R: rand::Rng`
     generics: LifetimeBounds<'a>,
 
     /// Whether there is a self argument (outer Option) i.e. whether
index 8dbdedc18483a1dd899c4c3cff42c20b55169d94..407da784b68b3bc1aa27fb2070ef2d6e17369149 100644 (file)
@@ -62,6 +62,8 @@ fn main() {
 // test harness access
 #[cfg(test)]
 extern crate test;
+
+extern crate rand;
 extern crate serialize;
 
 use std::cast::{transmute,transmute_copy};
@@ -71,11 +73,11 @@ fn main() {
 use std::from_str::FromStr;
 use std::hash::{Hash, sip};
 use std::num::FromStrRadix;
-use std::rand::Rng;
-use std::rand;
 use std::str;
 use std::vec;
 
+use rand::Rng;
+
 use serialize::{Encoder, Encodable, Decoder, Decodable};
 
 /// A 128-bit (16 byte) buffer containing the ID
@@ -519,12 +521,12 @@ fn rand<R: rand::Rng>(rng: &mut R) -> Uuid {
 #[cfg(test)]
 mod test {
     extern crate collections;
+    extern crate rand;
 
     use super::{Uuid, VariantMicrosoft, VariantNCS, VariantRFC4122,
                 Version1Mac, Version2Dce, Version3Md5, Version4Random,
                 Version5Sha1};
     use std::str;
-    use std::rand;
     use std::io::MemWriter;
 
     #[test]
index 1830a888345ff0275ab8ad8f24d5a736dc1bc70d..fcea5222e108b9bb4a717d0b7ec16d262cc1189a 100644 (file)
@@ -9,11 +9,12 @@
 // except according to those terms.
 
 extern crate collections;
+extern crate rand;
 extern crate time;
 
 use collections::{TrieMap, TreeMap, HashMap, HashSet};
 use std::os;
-use std::rand::{Rng, IsaacRng, SeedableRng};
+use rand::{Rng, IsaacRng, SeedableRng};
 use std::uint;
 use std::vec;
 
index d1c311d2a7d52bc685ef3edbd68cbd5f18d45dbb..96f3c6814ab931f6170e1a4b77fb29cd606c8723 100644 (file)
 // except according to those terms.
 
 extern crate collections;
+extern crate rand;
 extern crate time;
 
 use collections::bitv::BitvSet;
 use collections::TreeSet;
 use collections::HashSet;
 use std::os;
-use std::rand;
 use std::uint;
 
 struct Results {
index 7b23e27e82a3c37b45bc88ae63c78b3bdca664aa..2700b72ae9819928c93467fd0752476edf2570bc 100644 (file)
 
 #[feature(macro_rules)];
 
+extern crate rand;
 extern crate time;
 
 use time::precise_time_s;
+use rand::Rng;
 use std::mem::swap;
 use std::os;
-use std::rand::Rng;
-use std::rand;
 use std::str;
 use std::vec;
 use std::io::File;
index 42918ae5aa006f6c9cf44d516f320250492301c8..4954f083b36949f494b961d5c5c75e1b2b391203 100644 (file)
 // Multi-language Perlin noise benchmark.
 // See https://github.com/nsf/pnoise for timings and alternative implementations.
 
+extern crate rand;
+
 use std::f32::consts::PI;
-use std::rand::{Rng, StdRng};
+use rand::{Rng, StdRng};
 
 struct Vec2 {
     x: f32,
index 45a42f821456de4f58e59a4a40a21ee8fc2ccf61..1ec5dfa2da9f20a77268dea5abd45565ebfde283 100644 (file)
@@ -19,4 +19,3 @@ fn g<T:'static>(x: T) -> @T {
 }
 
 fn main() {}
-
index 89839c06f3baae981489647d2defbc14a2ad797a..6f3ce6abe1a765c332a167f3d8633baf961fbedc 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 
 struct Error;
index 4c47e77dd8178fb0b2d3a124cc97e45bba9515d8..c138c259a0f123b79a578e7bbd8809d85d4b07ad 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 
 struct Error;
index 1a2eb3fc6403e776391271b46b303d1ddc1fd43f..9226c4a79603bc3d09dd5f1fad8fb54af2742414 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 
 struct Error;
index 03fb284b50b8310b07167adf0553efb9994307be..e49bd45f4d0751f622f29a388069c784aba872ad 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 
 struct Error;
index 21da9fef3982fd6a96f29382470391827a194665..5da4ae5ca4242d3be630df4f68031680ff6682ef 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 
 struct Error;
index 2cfc7e2a259a3b3fed03303328a7da7fbc87dc92..3f44ea926b5c94a78ccd01c00362f0627a3e9468 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 
 struct Error;
index ce3d84a2e9b410f8049048b289b0a81d2234e48b..482954b39f7f2f72496f20b32e1d41f52f51b5cb 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 
 struct Error;
index c59a81fd147c64a6ef0d0c3f22ec181e4ff7c53d..5221869a2850323416c60f8153deababd8710560 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 
 struct Error;
index b797a0d7790a3854f677abc46454d646989f9537..a063628993e5ace4e3507ce41a552c500b376d19 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 
 struct Error;
index fb4d850ed11e2d29f14aad4a16babd6e5618522f..efa92c0a29a14c08b21276e8934ff7f4fb007893 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 
 struct Error;
index 182c669cbea1c03c16364d0fb18b2a36057099ec..b08f7305cfc48205f9b324deed5f2dc80328ea80 100644 (file)
@@ -12,8 +12,8 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
-use std::hash::Hash;
 
 struct Error;
 
index 7617e0a33c385131240c6300ae78b8286122ef65..6fe0094c8d21090f5db7754c3c6c44e425d42f2c 100644 (file)
@@ -12,8 +12,8 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
-use std::hash::Hash;
 
 struct Error;
 
index f20da9a9d16a7a3e604537a7a2502abf8ef14b13..0ae28d084ec04f2ca0e9cd57d71d92bf2f157885 100644 (file)
@@ -12,8 +12,8 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
-use std::hash::Hash;
 
 struct Error;
 
index 9b7ae50b738b81db9b436d73910d5748e3c857fc..1b69abb3e16e7cf01fe28023d3aa8ec1ffc52cb8 100644 (file)
@@ -12,8 +12,8 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
-use std::hash::Hash;
 
 struct Error;
 
index 319ba14c31c962fa859bfdf2ca633e9514a42822..edfc949970f2ed92f551cb918f958b17c741c7d5 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 #[deriving(Eq)]
 struct Error;
index 0067546d1aa0aec532099403c98971bf84319983..13da4454c3e276170b0370a278190b574c10a5be 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 #[deriving(Eq)]
 struct Error;
index a64f51f142dec30f693d28405c9b87bb06e22e02..bab38983dfb1916ebd440eb77d484adc2549461b 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 #[deriving(Eq)]
 struct Error;
index d289a4269329292a579b0db7c567a316d74221c8..bb211d7781e425171f385f06a1301f22280a3239 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 #[deriving(Eq)]
 struct Error;
index 615112c129e220edaa3952d9bd40a11a2a918f10..9338e23fbb475c1f1cc1339ec8e8a5bd3ab6b6e4 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 
 struct Error;
index a1943941e4171ffb9db59865705ab6e709d86369..1a978176d7983967547282ae325f3118b062415b 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 
 struct Error;
index 00d9c1de5c55f438758b5cab21e9fb8f6f978e11..7f62850398071527df391711cacd4d23f91b2cca 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 
 struct Error;
index c61a7c76bfb16de5248997e1db3c030244559f23..9b11c02784654c4db82d00699675d0901cf9f1da 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 
 struct Error;
index e22b51d19e56ef5b676176bfdc1060127079391b..972f60bf2c9ab363d8dcbf81fb38c0a6ad0d1bfb 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 
 struct Error;
index fffbd49a2bb3858a51daa51ba559d7f5d94b4db5..ba3fd1766b2f8841471d8cd5ccfc47269bacd1e5 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 
 struct Error;
index 45afd4454e86b98a1ba79d6112bb13be57731350..1e38c9dda5bd7a56fae2b26f0ce50de58c2bd7f0 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 
 struct Error;
index 1a199974eba0fbd89481659e23795613bed4f7d7..7347b324a235b61992cb382ecf4c707620e7cba1 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 
 struct Error;
index 7fc030bdb36f62d0f7418793238d5a0e5f34c3e7..4d362678283d3590bd344e7e734b4d05d97d8df9 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 #[deriving(Eq)]
 struct Error;
index 166311e030b1e5cf51fffd0fa1eee4a38a442ec0..66f84612f81150d674c4a13c80d1c963c7a900f3 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 #[deriving(Eq)]
 struct Error;
index f96c41a3865c12c700594992fdd9b7174347f466..ba29180e5e68ba4add28c36f729950fdaeb7d39a 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 #[deriving(Eq)]
 struct Error;
index 4b825adb8cfab35a0bf5797fbee3a984f30a3011..6dbd1e3cee94645d20a23db10b8510a3e33b257e 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 #[deriving(Eq)]
 struct Error;
index 7be90a2aa769db8e87b0bc4d20243c366dbaf7a4..54f7667be30a73e2a39878587ae3cbb6641902ec 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 #[deriving(Eq, Ord, TotalEq)]
 struct Error;
index ba97b28d18c70c041a01a84c39a5aefc731b7c49..6f51522d1a60f69627a1c0c0cd5d5f87bf1fe0a3 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 #[deriving(Eq, Ord, TotalEq)]
 struct Error;
index 014a5b97e36502054b5bbfadc9d3afd3b4590057..b659e4cee220110e33f387e9c5c420a4e6a2ccd0 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 #[deriving(Eq, Ord, TotalEq)]
 struct Error;
index 7e4d5b2201b3bb2aece65db6ecc4772e14bd8f3c..d4f30946d8ec8ce35bbccfa219bafcfb158d5a5a 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 #[deriving(Eq, Ord, TotalEq)]
 struct Error;
index 7256b1179dbf4f359f77ac7adde56c7258a50642..2e00c92f469e6a65c651cdd91c9c5b0c1841632a 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 
 struct Error;
index d483a86fddbb864a5168c7960ff62feaaafb98db..9487c6ced629fb6fe9c689d241c80ea7c17dc913 100644 (file)
@@ -12,6 +12,7 @@
 
 #[feature(struct_variant)];
 extern crate extra;
+extern crate rand;
 
 
 struct Error;
index 80371aa984052d693c7d61d1555d2900fff61fe4..45bb29f617fdb9b432ebe06fc1de4973f92a7d8b 100644 (file)
@@ -8,8 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+extern crate rand;
+use rand::{task_rng, Rng};
+
 use std::{char, os, str};
-use std::rand::{task_rng, Rng};
 use std::io::{File, Process};
 
 // creates unicode_input_multiple_files_{main,chars}.rs, where the
index 3227f672bcd66a3b3f7068a3b9f8c17d5ff19a9f..1ae6838be5bccc38c1831c28ab7be75756e32880 100644 (file)
@@ -8,8 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+extern crate rand;
+use rand::{task_rng, Rng};
+
 use std::{char, os, str};
-use std::rand::{task_rng, Rng};
 use std::io::{File, Process};
 
 // creates a file with `fn main() { <random ident> }` and checks the
index ac4101ae5b174465738a6c96f13dd3919da2e5b8..75567efa4703d5f768d04d2d8cb8f95d6aa2a689 100644 (file)
 
 #[feature(struct_variant, managed_boxes)];
 
+extern crate rand;
 extern crate serialize;
 
 use std::io::MemWriter;
-use std::rand::{random, Rand};
+use rand::{random, Rand};
 use serialize::{Encodable, Decodable};
 use serialize::ebml;
 use serialize::ebml::writer::Encoder;
index 174081786a77689e2a59e4c07a2fd32ded94c8df..a174b2c7ab1a448bf1ad41229f41bdcc8a83bab5 100644 (file)
@@ -22,6 +22,8 @@
 // except according to those terms.
 
 extern crate serialize; // {En,De}codable
+extern crate rand; // Rand
+
 mod submod {
     // if any of these are implemented without global calls for any
     // function calls, then being in a submodule will (correctly)
index 8277c0459c971aecba4fb27cdff81068ace21342..c43d8a26fd9c4bbf5a7b01adf5ea3637ca181991 100644 (file)
@@ -9,9 +9,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// ignore-fast #7103 `extern crate` does not work on check-fast
+
 #[feature(struct_variant)];
 
-use std::rand;
+extern crate rand;
 
 #[deriving(Rand)]
 struct A;
index 1c4ff92907d618008155daf98ebb66633e96e073..349b1ff7b449ef44ab81f1c0a3ac89f375d08755 100644 (file)
@@ -13,7 +13,8 @@
 // This test attempts to force the dynamic linker to resolve
 // external symbols as close to the red zone as possible.
 
-use std::rand;
+extern crate rand;
+
 use std::task;
 
 mod rustrt {
@@ -59,7 +60,7 @@ fn runtest2(f: extern fn(), frame_backoff: u32, last_stk: *u8) -> u32 {
 }
 
 pub fn main() {
-    use std::rand::Rng;
+    use rand::Rng;
     let fns = ~[
         calllink01,
         calllink02,
index 2c4a8aece194d52631ad59f72b723b430aa21fb8..e307ae36f96c1da6781cf399a3c9e276d37572f5 100644 (file)
@@ -8,8 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// ignore-fast #7103 `extern crate` does not work on check-fast
+extern crate rand;
+
 use std::task;
-use std::rand::{task_rng, Rng};
+use rand::{task_rng, Rng};
 
 static MAX_LEN: uint = 20;
 static mut drop_counts: [uint, .. MAX_LEN] = [0, .. MAX_LEN];