From 9823c2cc700fea541bf2670fcee93af662b63022 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Fri, 19 Feb 2021 21:48:47 +0100 Subject: Workaround rustdoc not honouring cfg(parallel_compiler). --- compiler/rustc_query_impl/src/plumbing.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'compiler/rustc_query_impl') diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs index 466c1f79f48..d4093f281dd 100644 --- a/compiler/rustc_query_impl/src/plumbing.rs +++ b/compiler/rustc_query_impl/src/plumbing.rs @@ -631,10 +631,12 @@ macro_rules! define_queries_struct { } impl QueryEngine<'tcx> for Queries<'tcx> { - #[cfg(parallel_compiler)] - unsafe fn deadlock(&'tcx self, tcx: TyCtxt<'tcx>, registry: &rustc_rayon_core::Registry) { - let tcx = QueryCtxt { tcx, queries: self }; - rustc_query_system::query::deadlock(tcx, registry) + unsafe fn deadlock(&'tcx self, _tcx: TyCtxt<'tcx>, _registry: &rustc_rayon_core::Registry) { + #[cfg(parallel_compiler)] + { + let tcx = QueryCtxt { tcx: _tcx, queries: self }; + rustc_query_system::query::deadlock(tcx, _registry) + } } fn encode_query_results( -- cgit 1.4.1-3-g733a5