diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2025-03-18 17:01:14 +0100 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2025-03-26 09:36:36 +0100 |
| commit | 6319bb38ccb316b193e35720c9df953e5ab01c22 (patch) | |
| tree | 158b0fb0c10112ab8f7ccb4239da843028e0e2c8 /compiler/rustc_query_impl/src/lib.rs | |
| parent | 6e8abb5ec65ac50f934df6cf0e8f248dc8e8805e (diff) | |
| download | rust-6319bb38ccb316b193e35720c9df953e5ab01c22.tar.gz rust-6319bb38ccb316b193e35720c9df953e5ab01c22.zip | |
Avoiding calling queries when collecting active queries
Diffstat (limited to 'compiler/rustc_query_impl/src/lib.rs')
| -rw-r--r-- | compiler/rustc_query_impl/src/lib.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/compiler/rustc_query_impl/src/lib.rs b/compiler/rustc_query_impl/src/lib.rs index a83c388c747..30a9e718d23 100644 --- a/compiler/rustc_query_impl/src/lib.rs +++ b/compiler/rustc_query_impl/src/lib.rs @@ -26,8 +26,8 @@ use rustc_middle::ty::TyCtxt; use rustc_query_system::dep_graph::SerializedDepNodeIndex; use rustc_query_system::ich::StableHashingContext; use rustc_query_system::query::{ - CycleError, HashResult, QueryCache, QueryConfig, QueryMap, QueryMode, QueryState, - get_query_incr, get_query_non_incr, + CycleError, HashResult, QueryCache, QueryConfig, QueryMap, QueryMode, QueryStackDeferred, + QueryState, get_query_incr, get_query_non_incr, }; use rustc_query_system::{HandleCycleError, Value}; use rustc_span::{ErrorGuaranteed, Span}; @@ -84,7 +84,10 @@ where } #[inline(always)] - fn query_state<'a>(self, qcx: QueryCtxt<'tcx>) -> &'a QueryState<Self::Key> + fn query_state<'a>( + self, + qcx: QueryCtxt<'tcx>, + ) -> &'a QueryState<Self::Key, QueryStackDeferred<'tcx>> where QueryCtxt<'tcx>: 'a, { @@ -93,7 +96,7 @@ where unsafe { &*(&qcx.tcx.query_system.states as *const QueryStates<'tcx>) .byte_add(self.dynamic.query_state) - .cast::<QueryState<Self::Key>>() + .cast::<QueryState<Self::Key, QueryStackDeferred<'tcx>>>() } } |
