diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-06-28 21:33:47 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-07-18 11:14:08 +0200 |
| commit | 5b921505ef0892e4d83d0e2743e3e2eecd03d461 (patch) | |
| tree | e41e4e413bb8e83b427ede51b034257f1ea266be /compiler/rustc_query_impl | |
| parent | 81241cbf3ae39db6188b7965b34e444f48e7ebbd (diff) | |
| download | rust-5b921505ef0892e4d83d0e2743e3e2eecd03d461.tar.gz rust-5b921505ef0892e4d83d0e2743e3e2eecd03d461.zip | |
Remove deadlock virtual call.
Diffstat (limited to 'compiler/rustc_query_impl')
| -rw-r--r-- | compiler/rustc_query_impl/src/plumbing.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs index 6ed82ebfdb3..58c1b57dbb9 100644 --- a/compiler/rustc_query_impl/src/plumbing.rs +++ b/compiler/rustc_query_impl/src/plumbing.rs @@ -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() |
