about summary refs log tree commit diff
path: root/src/libstd/sync/task_pool.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-02-19 07:59:27 +0000
committerbors <bors@rust-lang.org>2015-02-19 07:59:27 +0000
commit149f002437af373d5769f804eb5e02d8164a7668 (patch)
tree3d54ca061a9aab431f41ec6327b23c76d607f252 /src/libstd/sync/task_pool.rs
parent22992358bc74956f53b1a2ab99ae245cd3ca5550 (diff)
parent811c48fe22ffbe4ca45c32807c846d9a7c02a8f3 (diff)
downloadrust-149f002437af373d5769f804eb5e02d8164a7668.tar.gz
rust-149f002437af373d5769f804eb5e02d8164a7668.zip
Auto merge of #22497 - nikomatsakis:suffixes, r=alexcrichton
The old suffixes now issue warnings unless a feature-gate is given.

Fixes #22496.

r? @alexcrichton 
Diffstat (limited to 'src/libstd/sync/task_pool.rs')
-rw-r--r--src/libstd/sync/task_pool.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/sync/task_pool.rs b/src/libstd/sync/task_pool.rs
index f4274dd91cc..a45048be24c 100644
--- a/src/libstd/sync/task_pool.rs
+++ b/src/libstd/sync/task_pool.rs
@@ -63,17 +63,17 @@ impl<'a> Drop for Sentinel<'a> {
 /// use std::iter::AdditiveIterator;
 /// use std::sync::mpsc::channel;
 ///
-/// let pool = TaskPool::new(4u);
+/// let pool = TaskPool::new(4);
 ///
 /// let (tx, rx) = channel();
-/// for _ in 0..8u {
+/// for _ in 0..8 {
 ///     let tx = tx.clone();
 ///     pool.execute(move|| {
-///         tx.send(1u).unwrap();
+///         tx.send(1_u32).unwrap();
 ///     });
 /// }
 ///
-/// assert_eq!(rx.iter().take(8u).sum(), 8u);
+/// assert_eq!(rx.iter().take(8).sum(), 8);
 /// ```
 pub struct TaskPool {
     // How the threadpool communicates with subthreads.
@@ -142,7 +142,7 @@ mod test {
     use super::*;
     use sync::mpsc::channel;
 
-    const TEST_TASKS: uint = 4u;
+    const TEST_TASKS: uint = 4;
 
     #[test]
     fn test_works() {
@@ -154,7 +154,7 @@ mod test {
         for _ in 0..TEST_TASKS {
             let tx = tx.clone();
             pool.execute(move|| {
-                tx.send(1u).unwrap();
+                tx.send(1).unwrap();
             });
         }
 
@@ -183,7 +183,7 @@ mod test {
         for _ in 0..TEST_TASKS {
             let tx = tx.clone();
             pool.execute(move|| {
-                tx.send(1u).unwrap();
+                tx.send(1).unwrap();
             });
         }