about summary refs log tree commit diff
path: root/src/doc
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2014-03-02 11:33:24 +1100
committerHuon Wilson <dbau.pp+github@gmail.com>2014-03-12 11:31:43 +1100
commit198caa87cd870f8fd52bf0bd5fe471cf439c12f0 (patch)
tree3429f047229c85a48cc7214e8db9954c02be97a2 /src/doc
parent15e289846219cc3ad8b0225712bf2309f2c02439 (diff)
downloadrust-198caa87cd870f8fd52bf0bd5fe471cf439c12f0.tar.gz
rust-198caa87cd870f8fd52bf0bd5fe471cf439c12f0.zip
Update users for the std::rand -> librand move.
Diffstat (limited to 'src/doc')
-rw-r--r--src/doc/guide-tasks.md12
-rw-r--r--src/doc/tutorial.md2
2 files changed, 7 insertions, 7 deletions
diff --git a/src/doc/guide-tasks.md b/src/doc/guide-tasks.md
index 0d27071494f..e20baa32c1a 100644
--- a/src/doc/guide-tasks.md
+++ b/src/doc/guide-tasks.md
@@ -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);
diff --git a/src/doc/tutorial.md b/src/doc/tutorial.md
index de3f39ef81d..8f37aecfc34 100644
--- a/src/doc/tutorial.md
+++ b/src/doc/tutorial.md
@@ -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 }
 ~~~