Remove deadlock virtual call.

This commit is contained in:
Camille GILLOT 2021-06-28 21:33:47 +02:00
parent 81241cbf3a
commit 5b921505ef
4 changed files with 9 additions and 11 deletions

View file

@ -155,6 +155,11 @@ impl<'tcx> QueryCtxt<'tcx> {
self.queries.on_disk_cache.as_ref()
}
#[cfg(parallel_compiler)]
pub unsafe fn deadlock(self, registry: &rustc_rayon_core::Registry) {
rustc_query_system::query::deadlock(self, registry)
}
pub(super) fn encode_query_results(
self,
encoder: &mut on_disk_cache::CacheEncoder<'a, 'tcx, opaque::FileEncoder>,
@ -537,12 +542,6 @@ macro_rules! define_queries_struct {
this as _
}
#[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 try_mark_green(&'tcx self, tcx: TyCtxt<'tcx>, dep_node: &dep_graph::DepNode) -> bool {
let qcx = QueryCtxt { tcx, queries: self };
tcx.dep_graph.try_mark_green(qcx, dep_node).is_some()