@@ -15,7 +15,7 @@ use rustc_query_system::query::{
1515use rustc_span:: { DUMMY_SP , Span } ;
1616
1717use crate :: dep_graph:: { DepContext , DepNode , DepNodeIndex } ;
18- use crate :: job:: { QueryJobInfo , QueryMap , find_cycle_in_stack, report_cycle} ;
18+ use crate :: job:: { QueryJobInfo , QueryJobMap , find_cycle_in_stack, report_cycle} ;
1919use crate :: { QueryCtxt , QueryFlags , SemiDynamicQueryDispatcher } ;
2020
2121#[ inline]
@@ -45,8 +45,8 @@ pub(crate) fn gather_active_jobs_inner<'tcx, K: Copy>(
4545 state : & QueryState < ' tcx , K > ,
4646 tcx : TyCtxt < ' tcx > ,
4747 make_frame : fn ( TyCtxt < ' tcx > , K ) -> QueryStackFrame < QueryStackDeferred < ' tcx > > ,
48- jobs : & mut QueryMap < ' tcx > ,
4948 require_complete : bool ,
49+ job_map_out : & mut QueryJobMap < ' tcx > , // Out-param; job info is gathered into this map
5050) -> Option < ( ) > {
5151 let mut active = Vec :: new ( ) ;
5252
@@ -77,7 +77,7 @@ pub(crate) fn gather_active_jobs_inner<'tcx, K: Copy>(
7777 // queries leading to a deadlock.
7878 for ( key, job) in active {
7979 let frame = make_frame ( tcx, key) ;
80- jobs . insert ( job. id , QueryJobInfo { frame, job } ) ;
80+ job_map_out . insert ( job. id , QueryJobInfo { frame, job } ) ;
8181 }
8282
8383 Some ( ( ) )
@@ -213,12 +213,12 @@ fn cycle_error<'tcx, C: QueryCache, const FLAGS: QueryFlags>(
213213) -> ( C :: Value , Option < DepNodeIndex > ) {
214214 // Ensure there was no errors collecting all active jobs.
215215 // We need the complete map to ensure we find a cycle to break.
216- let query_map = qcx
216+ let job_map = qcx
217217 . collect_active_jobs_from_all_queries ( false )
218218 . ok ( )
219219 . expect ( "failed to collect active queries" ) ;
220220
221- let error = find_cycle_in_stack ( try_execute, query_map , & qcx. current_query_job ( ) , span) ;
221+ let error = find_cycle_in_stack ( try_execute, job_map , & qcx. current_query_job ( ) , span) ;
222222 ( mk_cycle ( query, qcx, error. lift ( ) ) , None )
223223}
224224
0 commit comments