about summary refs log tree commit diff
path: root/compiler/rustc_thread_pool/src/thread_pool/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_thread_pool/src/thread_pool/mod.rs')
-rw-r--r--compiler/rustc_thread_pool/src/thread_pool/mod.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_thread_pool/src/thread_pool/mod.rs b/compiler/rustc_thread_pool/src/thread_pool/mod.rs
index c8644ecf9a9..3294e2a77cb 100644
--- a/compiler/rustc_thread_pool/src/thread_pool/mod.rs
+++ b/compiler/rustc_thread_pool/src/thread_pool/mod.rs
@@ -14,7 +14,7 @@ use crate::{
     Scope, ScopeFifo, ThreadPoolBuildError, ThreadPoolBuilder, join, scope, scope_fifo, spawn,
 };
 
-mod test;
+mod tests;
 
 /// Represents a user created [thread-pool].
 ///
@@ -28,7 +28,7 @@ mod test;
 /// ## Creating a ThreadPool
 ///
 /// ```rust
-/// # use rustc_thred_pool as rayon;
+/// # use rustc_thread_pool as rayon;
 /// let pool = rayon::ThreadPoolBuilder::new().num_threads(8).build().unwrap();
 /// ```
 ///
@@ -88,10 +88,10 @@ impl ThreadPool {
     /// meantime. For example
     ///
     /// ```rust
-    /// # use rustc_thred_pool as rayon;
+    /// # use rustc_thread_pool as rayon;
     /// fn main() {
     ///     rayon::ThreadPoolBuilder::new().num_threads(1).build_global().unwrap();
-    ///     let pool = rustc_thred_pool::ThreadPoolBuilder::default().build().unwrap();
+    ///     let pool = rustc_thread_pool::ThreadPoolBuilder::default().build().unwrap();
     ///     let do_it = || {
     ///         print!("one ");
     ///         pool.install(||{});
@@ -123,7 +123,7 @@ impl ThreadPool {
     /// ## Using `install()`
     ///
     /// ```rust
-    ///    # use rustc_thred_pool as rayon;
+    ///    # use rustc_thread_pool as rayon;
     ///    fn main() {
     ///         let pool = rayon::ThreadPoolBuilder::new().num_threads(8).build().unwrap();
     ///         let n = pool.install(|| fib(20));
@@ -172,7 +172,7 @@ impl ThreadPool {
     /// # Examples
     ///
     /// ```
-    ///    # use rustc_thred_pool as rayon;
+    ///    # use rustc_thread_pool as rayon;
     ///    use std::sync::atomic::{AtomicUsize, Ordering};
     ///
     ///    fn main() {
@@ -401,7 +401,7 @@ impl ThreadPool {
     }
 
     pub(crate) fn wait_until_stopped(self) {
-        let registry = self.registry.clone();
+        let registry = Arc::clone(&self.registry);
         drop(self);
         registry.wait_until_stopped();
     }