mirror of
https://github.com/rust-lang/rust
synced 2024-10-02 06:44:33 +00:00
Workaround rustdoc not honouring cfg(parallel_compiler).
This commit is contained in:
parent
4581d16bcb
commit
9823c2cc70
|
@ -230,7 +230,6 @@ fn clone(&self) -> Self { *self }
|
|||
}
|
||||
|
||||
pub trait QueryEngine<'tcx>: rustc_data_structures::sync::Sync {
|
||||
#[cfg(parallel_compiler)]
|
||||
unsafe fn deadlock(&'tcx self, tcx: TyCtxt<'tcx>, registry: &rustc_rayon_core::Registry);
|
||||
|
||||
fn encode_query_results(
|
||||
|
|
|
@ -631,10 +631,12 @@ pub(crate) fn try_collect_active_jobs(
|
|||
}
|
||||
|
||||
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(
|
||||
|
|
Loading…
Reference in a new issue