mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Apply --cfg parallel_compiler
when documenting
This also reverts commit 9823c2cc70
working around the bug.
This commit is contained in:
parent
b52769b804
commit
1da4445109
@ -233,6 +233,7 @@ macro_rules! define_callbacks {
|
||||
}
|
||||
|
||||
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(
|
||||
|
@ -550,12 +550,10 @@ macro_rules! define_queries_struct {
|
||||
}
|
||||
|
||||
impl QueryEngine<'tcx> for Queries<'tcx> {
|
||||
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)
|
||||
}
|
||||
#[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)
|
||||
}
|
||||
|
||||
fn encode_query_results(
|
||||
|
@ -648,6 +648,7 @@ pub fn rustc_cargo_env(builder: &Builder<'_>, cargo: &mut Cargo, target: TargetS
|
||||
}
|
||||
if builder.config.rustc_parallel {
|
||||
cargo.rustflag("--cfg=parallel_compiler");
|
||||
cargo.rustdocflag("--cfg=parallel_compiler");
|
||||
}
|
||||
if builder.config.rust_verify_llvm_ir {
|
||||
cargo.env("RUSTC_VERIFY_LLVM_IR", "1");
|
||||
|
Loading…
Reference in New Issue
Block a user