@@ -138,7 +138,7 @@ pub struct DepKindStruct {
138138 pub ( super ) force_from_dep_node : fn ( tcx : TyCtxt < ' _ > , dep_node : & DepNode ) -> bool ,
139139
140140 /// Invoke a query to put the on-disk cached value in memory.
141- pub ( super ) try_load_from_on_disk_cache : fn ( TyCtxt < ' _ > , & DepNode ) ,
141+ pub ( crate ) try_load_from_on_disk_cache : fn ( QueryCtxt < ' _ > , & DepNode ) ,
142142}
143143
144144impl std:: ops:: Deref for DepKind {
@@ -273,7 +273,7 @@ pub mod dep_kind {
273273 false
274274 }
275275
276- fn try_load_from_on_disk_cache( tcx: TyCtxt <' _>, dep_node: & DepNode ) {
276+ fn try_load_from_on_disk_cache( tcx: QueryCtxt <' _>, dep_node: & DepNode ) {
277277 if is_anon {
278278 return
279279 }
@@ -287,9 +287,8 @@ pub mod dep_kind {
287287 . map( |c| c. is_green( ) )
288288 . unwrap_or( false ) ) ;
289289
290- let key = recover( tcx, dep_node) . unwrap_or_else( || panic!( "Failed to recover key for {:?} with hash {}" , dep_node, dep_node. hash) ) ;
291- let qcx = QueryCtxt { tcx, queries: tcx. queries } ;
292- if queries:: $variant:: cache_on_disk( qcx, & key, None ) {
290+ let key = recover( * tcx, dep_node) . unwrap_or_else( || panic!( "Failed to recover key for {:?} with hash {}" , dep_node, dep_node. hash) ) ;
291+ if queries:: $variant:: cache_on_disk( tcx, & key, None ) {
293292 let _ = tcx. $variant( key) ;
294293 }
295294 }
0 commit comments