@@ -191,7 +191,7 @@ where
191191 } ;
192192
193193 // Create the id of the job we're waiting for
194- let id = QueryJobId :: new ( job. id , lookup. shard , Q :: dep_kind ( ) ) ;
194+ let id = QueryJobId :: new ( job. id , lookup. shard , Q :: DEP_KIND ) ;
195195
196196 ( job. latch ( id) , _query_blocked_prof_timer)
197197 }
@@ -206,7 +206,7 @@ where
206206 lock. jobs = id;
207207 let id = QueryShardJobId ( NonZeroU32 :: new ( id) . unwrap ( ) ) ;
208208
209- let global_id = QueryJobId :: new ( id, lookup. shard , Q :: dep_kind ( ) ) ;
209+ let global_id = QueryJobId :: new ( id, lookup. shard , Q :: DEP_KIND ) ;
210210
211211 let job = tls:: with_related_context ( tcx, |icx| QueryJob :: new ( id, span, icx. query ) ) ;
212212
@@ -540,7 +540,7 @@ impl<'tcx> TyCtxt<'tcx> {
540540
541541 let ( ( result, dep_node_index) , diagnostics) = with_diagnostics ( |diagnostics| {
542542 self . start_query ( job. id , diagnostics, |tcx| {
543- tcx. dep_graph . with_anon_task ( Q :: dep_kind ( ) , || Q :: compute ( tcx, key) )
543+ tcx. dep_graph . with_anon_task ( Q :: DEP_KIND , || Q :: compute ( tcx, key) )
544544 } )
545545 } ) ;
546546
@@ -916,7 +916,7 @@ macro_rules! define_queries_inner {
916916 job: job. id,
917917 shard: u16 :: try_from( shard_id) . unwrap( ) ,
918918 kind:
919- <queries:: $name<' tcx> as QueryAccessors <' tcx>>:: dep_kind ( ) ,
919+ <queries:: $name<' tcx> as QueryAccessors <' tcx>>:: DEP_KIND ,
920920 } ;
921921 let info = QueryInfo {
922922 span: job. span,
@@ -1023,6 +1023,7 @@ macro_rules! define_queries_inner {
10231023 impl <$tcx> QueryAccessors <$tcx> for queries:: $name<$tcx> {
10241024 const ANON : bool = is_anon!( [ $( $modifiers) * ] ) ;
10251025 const EVAL_ALWAYS : bool = is_eval_always!( [ $( $modifiers) * ] ) ;
1026+ const DEP_KIND : dep_graph:: DepKind = dep_graph:: DepKind :: $node;
10261027
10271028 type Cache = query_storage!( [ $( $modifiers) * ] [ $K, $V] ) ;
10281029
@@ -1042,11 +1043,6 @@ macro_rules! define_queries_inner {
10421043 DepConstructor :: $node( tcx, * key)
10431044 }
10441045
1045- #[ inline( always) ]
1046- fn dep_kind( ) -> dep_graph:: DepKind {
1047- dep_graph:: DepKind :: $node
1048- }
1049-
10501046 #[ inline]
10511047 fn compute( tcx: TyCtxt <' tcx>, key: Self :: Key ) -> Self :: Value {
10521048 __query_compute:: $name( tcx, key)
0 commit comments