about summary refs log tree commit diff
path: root/compiler/rustc_thread_pool/tests/init_zero_threads.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_thread_pool/tests/init_zero_threads.rs')
-rw-r--r--compiler/rustc_thread_pool/tests/init_zero_threads.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/rustc_thread_pool/tests/init_zero_threads.rs b/compiler/rustc_thread_pool/tests/init_zero_threads.rs
new file mode 100644
index 00000000000..261493fcb7b
--- /dev/null
+++ b/compiler/rustc_thread_pool/tests/init_zero_threads.rs
@@ -0,0 +1,9 @@
+#![allow(unused_crate_dependencies)]
+
+use rustc_thread_pool::ThreadPoolBuilder;
+
+#[test]
+#[cfg_attr(any(target_os = "emscripten", target_family = "wasm"), ignore)]
+fn init_zero_threads() {
+    ThreadPoolBuilder::new().num_threads(0).build_global().unwrap();
+}