diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-02-19 21:48:47 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-02-19 22:05:27 +0100 |
| commit | 9823c2cc700fea541bf2670fcee93af662b63022 (patch) | |
| tree | 969db3412c4b52ce291a151d250e4378fdea9dc4 /compiler/rustc_query_impl | |
| parent | 4581d16bcbea9273b6755dd24a884a234a0dc2f7 (diff) | |
| download | rust-9823c2cc700fea541bf2670fcee93af662b63022.tar.gz rust-9823c2cc700fea541bf2670fcee93af662b63022.zip | |
Workaround rustdoc not honouring cfg(parallel_compiler).
Diffstat (limited to 'compiler/rustc_query_impl')
| -rw-r--r-- | compiler/rustc_query_impl/src/plumbing.rs | 10 |
1 files changed, 6 insertions, 4 deletions
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( |
