diff options
Diffstat (limited to 'compiler/rustc_thread_pool/tests')
6 files changed, 18 insertions, 6 deletions
diff --git a/compiler/rustc_thread_pool/tests/double_init_fail.rs b/compiler/rustc_thread_pool/tests/double_init_fail.rs index ef190099293..85e509518d4 100644 --- a/compiler/rustc_thread_pool/tests/double_init_fail.rs +++ b/compiler/rustc_thread_pool/tests/double_init_fail.rs @@ -1,6 +1,8 @@ +#![allow(unused_crate_dependencies)] + use std::error::Error; -use rustc_thred_pool::ThreadPoolBuilder; +use rustc_thread_pool::ThreadPoolBuilder; #[test] #[cfg_attr(any(target_os = "emscripten", target_family = "wasm"), ignore)] diff --git a/compiler/rustc_thread_pool/tests/init_zero_threads.rs b/compiler/rustc_thread_pool/tests/init_zero_threads.rs index 1f7e299e3e9..261493fcb7b 100644 --- a/compiler/rustc_thread_pool/tests/init_zero_threads.rs +++ b/compiler/rustc_thread_pool/tests/init_zero_threads.rs @@ -1,4 +1,6 @@ -use rustc_thred_pool::ThreadPoolBuilder; +#![allow(unused_crate_dependencies)] + +use rustc_thread_pool::ThreadPoolBuilder; #[test] #[cfg_attr(any(target_os = "emscripten", target_family = "wasm"), ignore)] diff --git a/compiler/rustc_thread_pool/tests/scope_join.rs b/compiler/rustc_thread_pool/tests/scope_join.rs index 0bd33d086cf..83468da81c0 100644 --- a/compiler/rustc_thread_pool/tests/scope_join.rs +++ b/compiler/rustc_thread_pool/tests/scope_join.rs @@ -1,10 +1,12 @@ +#![allow(unused_crate_dependencies)] + /// Test that one can emulate join with `scope`: fn pseudo_join<F, G>(f: F, g: G) where F: FnOnce() + Send, G: FnOnce() + Send, { - rustc_thred_pool::scope(|s| { + rustc_thread_pool::scope(|s| { s.spawn(|_| g()); f(); }); diff --git a/compiler/rustc_thread_pool/tests/scoped_threadpool.rs b/compiler/rustc_thread_pool/tests/scoped_threadpool.rs index e4b0f6c41e1..295da650e88 100644 --- a/compiler/rustc_thread_pool/tests/scoped_threadpool.rs +++ b/compiler/rustc_thread_pool/tests/scoped_threadpool.rs @@ -1,5 +1,7 @@ +#![allow(unused_crate_dependencies)] + use crossbeam_utils::thread; -use rustc_thred_pool::ThreadPoolBuilder; +use rustc_thread_pool::ThreadPoolBuilder; #[derive(PartialEq, Eq, Debug)] struct Local(i32); diff --git a/compiler/rustc_thread_pool/tests/simple_panic.rs b/compiler/rustc_thread_pool/tests/simple_panic.rs index 16896e36fa0..b35b4d632d2 100644 --- a/compiler/rustc_thread_pool/tests/simple_panic.rs +++ b/compiler/rustc_thread_pool/tests/simple_panic.rs @@ -1,4 +1,6 @@ -use rustc_thred_pool::join; +#![allow(unused_crate_dependencies)] + +use rustc_thread_pool::join; #[test] #[should_panic(expected = "should panic")] diff --git a/compiler/rustc_thread_pool/tests/stack_overflow_crash.rs b/compiler/rustc_thread_pool/tests/stack_overflow_crash.rs index 49c9ca1d75e..805b6d8ee3f 100644 --- a/compiler/rustc_thread_pool/tests/stack_overflow_crash.rs +++ b/compiler/rustc_thread_pool/tests/stack_overflow_crash.rs @@ -1,9 +1,11 @@ +#![allow(unused_crate_dependencies)] + use std::env; #[cfg(target_os = "linux")] use std::os::unix::process::ExitStatusExt; use std::process::{Command, ExitStatus, Stdio}; -use rustc_thred_pool::ThreadPoolBuilder; +use rustc_thread_pool::ThreadPoolBuilder; fn force_stack_overflow(depth: u32) { let mut buffer = [0u8; 1024 * 1024]; |
