There was an error while loading. Please reload this page.
1 parent c6d42d7 commit 5aa2a90Copy full SHA for 5aa2a90
compiler/rustc_interface/src/util.rs
@@ -287,7 +287,15 @@ pub(crate) fn run_in_thread_pool_with_globals<
287
pool.install(|| f(current_gcx.into_inner(), proxy))
288
},
289
)
290
- .unwrap()
+ .unwrap_or_else(|err| {
291
+ let mut diag = thread_builder_diag.early_struct_fatal(format!(
292
+ "failed to spawn compiler thread pool: could not create {threads} threads ({err})",
293
+ ));
294
+ diag.help(
295
+ "try lowering `-Z threads` or checking the operating system's resource limits",
296
+ );
297
+ diag.emit();
298
+ })
299
})
300
301
}
0 commit comments