about summary refs log tree commit diff
path: root/compiler/rustc_thread_pool/src
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_thread_pool/src')
-rw-r--r--compiler/rustc_thread_pool/src/compile_fail/quicksort_race1.rs2
-rw-r--r--compiler/rustc_thread_pool/src/compile_fail/quicksort_race2.rs2
-rw-r--r--compiler/rustc_thread_pool/src/compile_fail/quicksort_race3.rs2
-rw-r--r--compiler/rustc_thread_pool/src/compile_fail/rc_return.rs4
-rw-r--r--compiler/rustc_thread_pool/src/compile_fail/rc_upvar.rs2
-rw-r--r--compiler/rustc_thread_pool/src/compile_fail/scope_join_bad.rs4
-rw-r--r--compiler/rustc_thread_pool/src/join/mod.rs2
-rw-r--r--compiler/rustc_thread_pool/src/lib.rs12
-rw-r--r--compiler/rustc_thread_pool/src/scope/mod.rs16
-rw-r--r--compiler/rustc_thread_pool/src/spawn/mod.rs2
-rw-r--r--compiler/rustc_thread_pool/src/thread_pool/mod.rs10
11 files changed, 29 insertions, 29 deletions
diff --git a/compiler/rustc_thread_pool/src/compile_fail/quicksort_race1.rs b/compiler/rustc_thread_pool/src/compile_fail/quicksort_race1.rs
index 5615033895a..1f7a7b0b429 100644
--- a/compiler/rustc_thread_pool/src/compile_fail/quicksort_race1.rs
+++ b/compiler/rustc_thread_pool/src/compile_fail/quicksort_race1.rs
@@ -7,7 +7,7 @@ fn quick_sort<T:PartialOrd+Send>(v: &mut [T]) {
 
     let mid = partition(v);
     let (lo, _hi) = v.split_at_mut(mid);
-    rayon_core::join(|| quick_sort(lo), || quick_sort(lo)); //~ ERROR
+    rustc_thred_pool::join(|| quick_sort(lo), || quick_sort(lo)); //~ ERROR
 }
 
 fn partition<T:PartialOrd+Send>(v: &mut [T]) -> usize {
diff --git a/compiler/rustc_thread_pool/src/compile_fail/quicksort_race2.rs b/compiler/rustc_thread_pool/src/compile_fail/quicksort_race2.rs
index 020589c29a8..71b695dd855 100644
--- a/compiler/rustc_thread_pool/src/compile_fail/quicksort_race2.rs
+++ b/compiler/rustc_thread_pool/src/compile_fail/quicksort_race2.rs
@@ -7,7 +7,7 @@ fn quick_sort<T:PartialOrd+Send>(v: &mut [T]) {
 
     let mid = partition(v);
     let (lo, _hi) = v.split_at_mut(mid);
-    rayon_core::join(|| quick_sort(lo), || quick_sort(v)); //~ ERROR
+    rustc_thred_pool::join(|| quick_sort(lo), || quick_sort(v)); //~ ERROR
 }
 
 fn partition<T:PartialOrd+Send>(v: &mut [T]) -> usize {
diff --git a/compiler/rustc_thread_pool/src/compile_fail/quicksort_race3.rs b/compiler/rustc_thread_pool/src/compile_fail/quicksort_race3.rs
index 16fbf3b824d..8484cebaae8 100644
--- a/compiler/rustc_thread_pool/src/compile_fail/quicksort_race3.rs
+++ b/compiler/rustc_thread_pool/src/compile_fail/quicksort_race3.rs
@@ -7,7 +7,7 @@ fn quick_sort<T:PartialOrd+Send>(v: &mut [T]) {
 
     let mid = partition(v);
     let (_lo, hi) = v.split_at_mut(mid);
-    rayon_core::join(|| quick_sort(hi), || quick_sort(hi)); //~ ERROR
+    rustc_thred_pool::join(|| quick_sort(hi), || quick_sort(hi)); //~ ERROR
 }
 
 fn partition<T:PartialOrd+Send>(v: &mut [T]) -> usize {
diff --git a/compiler/rustc_thread_pool/src/compile_fail/rc_return.rs b/compiler/rustc_thread_pool/src/compile_fail/rc_return.rs
index 93e3a603849..509c8d62ad1 100644
--- a/compiler/rustc_thread_pool/src/compile_fail/rc_return.rs
+++ b/compiler/rustc_thread_pool/src/compile_fail/rc_return.rs
@@ -2,7 +2,7 @@
 
 use std::rc::Rc;
 
-rayon_core::join(|| Rc::new(22), || ()); //~ ERROR
+rustc_thred_pool::join(|| Rc::new(22), || ()); //~ ERROR
 
 ``` */
 mod left {}
@@ -11,7 +11,7 @@ mod left {}
 
 use std::rc::Rc;
 
-rayon_core::join(|| (), || Rc::new(23)); //~ ERROR
+rustc_thred_pool::join(|| (), || Rc::new(23)); //~ ERROR
 
 ``` */
 mod right {}
diff --git a/compiler/rustc_thread_pool/src/compile_fail/rc_upvar.rs b/compiler/rustc_thread_pool/src/compile_fail/rc_upvar.rs
index d8aebcfcbf2..a27b3c8c39f 100644
--- a/compiler/rustc_thread_pool/src/compile_fail/rc_upvar.rs
+++ b/compiler/rustc_thread_pool/src/compile_fail/rc_upvar.rs
@@ -3,7 +3,7 @@
 use std::rc::Rc;
 
 let r = Rc::new(22);
-rayon_core::join(|| r.clone(), || r.clone());
+rustc_thred_pool::join(|| r.clone(), || r.clone());
 //~^ ERROR
 
 ``` */
diff --git a/compiler/rustc_thread_pool/src/compile_fail/scope_join_bad.rs b/compiler/rustc_thread_pool/src/compile_fail/scope_join_bad.rs
index 75e4c5ca6c0..6e700a483b1 100644
--- a/compiler/rustc_thread_pool/src/compile_fail/scope_join_bad.rs
+++ b/compiler/rustc_thread_pool/src/compile_fail/scope_join_bad.rs
@@ -3,7 +3,7 @@
 fn bad_scope<F>(f: F)
     where F: FnOnce(&i32) + Send,
 {
-    rayon_core::scope(|s| {
+    rustc_thred_pool::scope(|s| {
         let x = 22;
         s.spawn(|_| f(&x)); //~ ERROR `x` does not live long enough
     });
@@ -13,7 +13,7 @@ fn good_scope<F>(f: F)
     where F: FnOnce(&i32) + Send,
 {
     let x = 22;
-    rayon_core::scope(|s| {
+    rustc_thred_pool::scope(|s| {
         s.spawn(|_| f(&x));
     });
 }
diff --git a/compiler/rustc_thread_pool/src/join/mod.rs b/compiler/rustc_thread_pool/src/join/mod.rs
index 798a8347d79..e48d17f16a3 100644
--- a/compiler/rustc_thread_pool/src/join/mod.rs
+++ b/compiler/rustc_thread_pool/src/join/mod.rs
@@ -41,7 +41,7 @@ mod test;
 /// [the `par_sort` method]: ../rayon/slice/trait.ParallelSliceMut.html#method.par_sort
 ///
 /// ```rust
-/// # use rayon_core as rayon;
+/// # use rustc_thred_pool as rayon;
 /// let mut v = vec![5, 1, 8, 22, 0, 44];
 /// quick_sort(&mut v);
 /// assert_eq!(v, vec![0, 1, 5, 8, 22, 44]);
diff --git a/compiler/rustc_thread_pool/src/lib.rs b/compiler/rustc_thread_pool/src/lib.rs
index 179d63ed668..f1d466b4948 100644
--- a/compiler/rustc_thread_pool/src/lib.rs
+++ b/compiler/rustc_thread_pool/src/lib.rs
@@ -152,14 +152,14 @@ enum ErrorKind {
 /// The following creates a thread pool with 22 threads.
 ///
 /// ```rust
-/// # use rayon_core as rayon;
+/// # use rustc_thred_pool as rayon;
 /// let pool = rayon::ThreadPoolBuilder::new().num_threads(22).build().unwrap();
 /// ```
 ///
 /// To instead configure the global thread pool, use [`build_global()`]:
 ///
 /// ```rust
-/// # use rayon_core as rayon;
+/// # use rustc_thred_pool as rayon;
 /// rayon::ThreadPoolBuilder::new().num_threads(22).build_global().unwrap();
 /// ```
 ///
@@ -315,7 +315,7 @@ impl ThreadPoolBuilder {
     /// A scoped pool may be useful in combination with scoped thread-local variables.
     ///
     /// ```
-    /// # use rayon_core as rayon;
+    /// # use rustc_thred_pool as rayon;
     ///
     /// scoped_tls::scoped_thread_local!(static POOL_DATA: Vec<i32>);
     ///
@@ -382,7 +382,7 @@ impl<S> ThreadPoolBuilder<S> {
     /// A minimal spawn handler just needs to call `run()` from an independent thread.
     ///
     /// ```
-    /// # use rayon_core as rayon;
+    /// # use rustc_thred_pool as rayon;
     /// fn main() -> Result<(), rayon::ThreadPoolBuildError> {
     ///     let pool = rayon::ThreadPoolBuilder::new()
     ///         .spawn_handler(|thread| {
@@ -400,7 +400,7 @@ impl<S> ThreadPoolBuilder<S> {
     /// any errors from the thread builder.
     ///
     /// ```
-    /// # use rayon_core as rayon;
+    /// # use rustc_thred_pool as rayon;
     /// fn main() -> Result<(), rayon::ThreadPoolBuildError> {
     ///     let pool = rayon::ThreadPoolBuilder::new()
     ///         .spawn_handler(|thread| {
@@ -429,7 +429,7 @@ impl<S> ThreadPoolBuilder<S> {
     /// [`std::thread::scope`]: https://doc.rust-lang.org/std/thread/fn.scope.html
     ///
     /// ```
-    /// # use rayon_core as rayon;
+    /// # use rustc_thred_pool as rayon;
     /// fn main() -> Result<(), rayon::ThreadPoolBuildError> {
     ///     std::thread::scope(|scope| {
     ///         let pool = rayon::ThreadPoolBuilder::new()
diff --git a/compiler/rustc_thread_pool/src/scope/mod.rs b/compiler/rustc_thread_pool/src/scope/mod.rs
index 95a4e0b7a18..82b3d053dcb 100644
--- a/compiler/rustc_thread_pool/src/scope/mod.rs
+++ b/compiler/rustc_thread_pool/src/scope/mod.rs
@@ -84,7 +84,7 @@ struct ScopeBase<'scope> {
 /// it would be less efficient than the real implementation:
 ///
 /// ```rust
-/// # use rayon_core as rayon;
+/// # use rustc_thred_pool as rayon;
 /// pub fn join<A,B,RA,RB>(oper_a: A, oper_b: B) -> (RA, RB)
 ///     where A: FnOnce() -> RA + Send,
 ///           B: FnOnce() -> RB + Send,
@@ -125,7 +125,7 @@ struct ScopeBase<'scope> {
 /// To see how and when tasks are joined, consider this example:
 ///
 /// ```rust
-/// # use rayon_core as rayon;
+/// # use rustc_thred_pool as rayon;
 /// // point start
 /// rayon::scope(|s| {
 ///     s.spawn(|s| { // task s.1
@@ -193,7 +193,7 @@ struct ScopeBase<'scope> {
 /// spawned task.
 ///
 /// ```rust
-/// # use rayon_core as rayon;
+/// # use rustc_thred_pool as rayon;
 /// let ok: Vec<i32> = vec![1, 2, 3];
 /// rayon::scope(|s| {
 ///     let bad: Vec<i32> = vec![4, 5, 6];
@@ -217,7 +217,7 @@ struct ScopeBase<'scope> {
 /// in this case including both `ok` *and* `bad`:
 ///
 /// ```rust
-/// # use rayon_core as rayon;
+/// # use rustc_thred_pool as rayon;
 /// let ok: Vec<i32> = vec![1, 2, 3];
 /// rayon::scope(|s| {
 ///     let bad: Vec<i32> = vec![4, 5, 6];
@@ -238,7 +238,7 @@ struct ScopeBase<'scope> {
 /// is a borrow of `ok` and capture *that*:
 ///
 /// ```rust
-/// # use rayon_core as rayon;
+/// # use rustc_thred_pool as rayon;
 /// let ok: Vec<i32> = vec![1, 2, 3];
 /// rayon::scope(|s| {
 ///     let bad: Vec<i32> = vec![4, 5, 6];
@@ -260,7 +260,7 @@ struct ScopeBase<'scope> {
 /// of individual variables:
 ///
 /// ```rust
-/// # use rayon_core as rayon;
+/// # use rustc_thred_pool as rayon;
 /// let ok: Vec<i32> = vec![1, 2, 3];
 /// rayon::scope(|s| {
 ///     let bad: Vec<i32> = vec![4, 5, 6];
@@ -312,7 +312,7 @@ where
 /// [`scope()`]: fn.scope.html
 ///
 /// ```rust
-/// # use rayon_core as rayon;
+/// # use rustc_thred_pool as rayon;
 /// // point start
 /// rayon::scope_fifo(|s| {
 ///     s.spawn_fifo(|s| { // task s.1
@@ -487,7 +487,7 @@ impl<'scope> Scope<'scope> {
     /// # Examples
     ///
     /// ```rust
-    /// # use rayon_core as rayon;
+    /// # use rustc_thred_pool as rayon;
     /// let mut value_a = None;
     /// let mut value_b = None;
     /// let mut value_c = None;
diff --git a/compiler/rustc_thread_pool/src/spawn/mod.rs b/compiler/rustc_thread_pool/src/spawn/mod.rs
index f1679a98234..92b89ed5948 100644
--- a/compiler/rustc_thread_pool/src/spawn/mod.rs
+++ b/compiler/rustc_thread_pool/src/spawn/mod.rs
@@ -50,7 +50,7 @@ use crate::unwind;
 /// This code creates a Rayon task that increments a global counter.
 ///
 /// ```rust
-/// # use rayon_core as rayon;
+/// # use rustc_thred_pool as rayon;
 /// use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
 ///
 /// static GLOBAL_COUNTER: AtomicUsize = ATOMIC_USIZE_INIT;
diff --git a/compiler/rustc_thread_pool/src/thread_pool/mod.rs b/compiler/rustc_thread_pool/src/thread_pool/mod.rs
index ce8783cf0d6..c8644ecf9a9 100644
--- a/compiler/rustc_thread_pool/src/thread_pool/mod.rs
+++ b/compiler/rustc_thread_pool/src/thread_pool/mod.rs
@@ -28,7 +28,7 @@ mod test;
 /// ## Creating a ThreadPool
 ///
 /// ```rust
-/// # use rayon_core as rayon;
+/// # use rustc_thred_pool as rayon;
 /// let pool = rayon::ThreadPoolBuilder::new().num_threads(8).build().unwrap();
 /// ```
 ///
@@ -88,10 +88,10 @@ impl ThreadPool {
     /// meantime. For example
     ///
     /// ```rust
-    /// # use rayon_core as rayon;
+    /// # use rustc_thred_pool as rayon;
     /// fn main() {
     ///     rayon::ThreadPoolBuilder::new().num_threads(1).build_global().unwrap();
-    ///     let pool = rayon_core::ThreadPoolBuilder::default().build().unwrap();
+    ///     let pool = rustc_thred_pool::ThreadPoolBuilder::default().build().unwrap();
     ///     let do_it = || {
     ///         print!("one ");
     ///         pool.install(||{});
@@ -123,7 +123,7 @@ impl ThreadPool {
     /// ## Using `install()`
     ///
     /// ```rust
-    ///    # use rayon_core as rayon;
+    ///    # use rustc_thred_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 rayon_core as rayon;
+    ///    # use rustc_thred_pool as rayon;
     ///    use std::sync::atomic::{AtomicUsize, Ordering};
     ///
     ///    fn main() {