@@ -66,7 +66,7 @@ impl QueryContext for QueryCtxt<'_> {
6666 tls:: with_related_context ( * * self , |icx| icx. query )
6767 }
6868
69- fn try_collect_active_jobs ( & self ) -> Option < QueryMap > {
69+ fn try_collect_active_jobs ( & self ) -> Option < QueryMap < DepKind > > {
7070 self . queries . try_collect_active_jobs ( * * self )
7171 }
7272
@@ -195,7 +195,7 @@ impl<'tcx> QueryCtxt<'tcx> {
195195
196196#[ derive( Clone , Copy ) ]
197197pub ( crate ) struct QueryStruct < ' tcx > {
198- pub try_collect_active_jobs : fn ( QueryCtxt < ' tcx > , & mut QueryMap ) -> Option < ( ) > ,
198+ pub try_collect_active_jobs : fn ( QueryCtxt < ' tcx > , & mut QueryMap < DepKind > ) -> Option < ( ) > ,
199199 pub alloc_self_profile_query_strings : fn ( TyCtxt < ' tcx > , & mut QueryKeyStringCache ) ,
200200 pub encode_query_results :
201201 Option < fn ( QueryCtxt < ' tcx > , & mut CacheEncoder < ' _ , ' tcx > , & mut EncodedDepNodeIndex ) > ,
@@ -313,7 +313,7 @@ pub(crate) fn create_query_frame<
313313 key : K ,
314314 kind : DepKind ,
315315 name : & ' static str ,
316- ) -> QueryStackFrame {
316+ ) -> QueryStackFrame < DepKind > {
317317 // Disable visible paths printing for performance reasons.
318318 // Showing visible path instead of any path is not that important in production.
319319 let description = ty:: print:: with_no_visible_paths!(
@@ -346,7 +346,7 @@ pub(crate) fn create_query_frame<
346346 } ;
347347 let ty_adt_id = key. ty_adt_id ( ) ;
348348
349- QueryStackFrame :: new ( name , description, span, def_id, def_kind, ty_adt_id, hash)
349+ QueryStackFrame :: new ( description, span, def_id, def_kind, kind , ty_adt_id, hash)
350350}
351351
352352fn try_load_from_on_disk_cache < ' tcx , Q > ( tcx : TyCtxt < ' tcx > , dep_node : DepNode )
@@ -378,7 +378,7 @@ fn force_from_dep_node<'tcx, Q>(tcx: TyCtxt<'tcx>, dep_node: DepNode) -> bool
378378where
379379 Q : QueryConfig < QueryCtxt < ' tcx > > ,
380380 Q :: Key : DepNodeParams < TyCtxt < ' tcx > > ,
381- Q :: Value : Value < TyCtxt < ' tcx > > ,
381+ Q :: Value : Value < TyCtxt < ' tcx > , DepKind > ,
382382{
383383 // We must avoid ever having to call `force_from_dep_node()` for a
384384 // `DepNode::codegen_unit`:
@@ -402,7 +402,7 @@ where
402402 #[ cfg( debug_assertions) ]
403403 let _guard = tracing:: span!( tracing:: Level :: TRACE , stringify!( $name) , ?key) . entered ( ) ;
404404 let tcx = QueryCtxt :: from_tcx ( tcx) ;
405- force_query :: < Q , _ > ( tcx, key, dep_node) ;
405+ force_query :: < Q , _ , DepKind > ( tcx, key, dep_node) ;
406406 true
407407 } else {
408408 false
@@ -480,7 +480,7 @@ macro_rules! define_queries {
480480 type Cache = query_storage:: $name<' tcx>;
481481
482482 #[ inline( always) ]
483- fn query_state<' a>( tcx: QueryCtxt <' tcx>) -> & ' a QueryState <Self :: Key >
483+ fn query_state<' a>( tcx: QueryCtxt <' tcx>) -> & ' a QueryState <Self :: Key , crate :: dep_graph :: DepKind >
484484 where QueryCtxt <' tcx>: ' a
485485 {
486486 & tcx. queries. $name
@@ -587,9 +587,10 @@ macro_rules! define_queries {
587587 use $crate:: plumbing:: { QueryStruct , QueryCtxt } ;
588588 use $crate:: profiling_support:: QueryKeyStringCache ;
589589 use rustc_query_system:: query:: QueryMap ;
590+ use rustc_middle:: dep_graph:: DepKind ;
590591
591592 pub ( super ) const fn dummy_query_struct<' tcx>( ) -> QueryStruct <' tcx> {
592- fn noop_try_collect_active_jobs( _: QueryCtxt <' _>, _: & mut QueryMap ) -> Option <( ) > {
593+ fn noop_try_collect_active_jobs( _: QueryCtxt <' _>, _: & mut QueryMap < DepKind > ) -> Option <( ) > {
593594 None
594595 }
595596 fn noop_alloc_self_profile_query_strings( _: TyCtxt <' _>, _: & mut QueryKeyStringCache ) { }
@@ -675,7 +676,8 @@ macro_rules! define_queries_struct {
675676 $(
676677 $( #[ $attr] ) *
677678 $name: QueryState <
678- <queries:: $name<' tcx> as QueryConfig <QueryCtxt <' tcx>>>:: Key
679+ <queries:: $name<' tcx> as QueryConfig <QueryCtxt <' tcx>>>:: Key ,
680+ rustc_middle:: dep_graph:: DepKind ,
679681 >,
680682 ) *
681683 }
@@ -684,7 +686,7 @@ macro_rules! define_queries_struct {
684686 pub ( crate ) fn try_collect_active_jobs(
685687 & ' tcx self ,
686688 tcx: TyCtxt <' tcx>,
687- ) -> Option <QueryMap > {
689+ ) -> Option <QueryMap <rustc_middle :: dep_graph :: DepKind > > {
688690 let tcx = QueryCtxt { tcx, queries: self } ;
689691 let mut jobs = QueryMap :: default ( ) ;
690692
@@ -718,7 +720,7 @@ macro_rules! define_queries_struct {
718720 mode: QueryMode ,
719721 ) -> Option <query_stored:: $name<' tcx>> {
720722 let qcx = QueryCtxt { tcx, queries: self } ;
721- get_query:: <queries:: $name<' tcx>, _>( qcx, span, key, mode)
723+ get_query:: <queries:: $name<' tcx>, _, rustc_middle :: dep_graph :: DepKind >( qcx, span, key, mode)
722724 } ) *
723725 }
724726 } ;
0 commit comments