@@ -154,7 +154,7 @@ impl<'tcx, Q: QueryDescription<'tcx>> JobOwner<'tcx, Q> {
154154 } ;
155155
156156 // Create the id of the job we're waiting for
157- let id = QueryJobId :: new ( job. id , lookup. shard , Q :: dep_kind ( ) ) ;
157+ let id = QueryJobId :: new ( job. id , lookup. shard , Q :: DEP_KIND ) ;
158158
159159 ( job. latch ( id) , _query_blocked_prof_timer)
160160 }
@@ -169,7 +169,7 @@ impl<'tcx, Q: QueryDescription<'tcx>> JobOwner<'tcx, Q> {
169169 lock. jobs = id;
170170 let id = QueryShardJobId ( NonZeroU32 :: new ( id) . unwrap ( ) ) ;
171171
172- let global_id = QueryJobId :: new ( id, lookup. shard , Q :: dep_kind ( ) ) ;
172+ let global_id = QueryJobId :: new ( id, lookup. shard , Q :: DEP_KIND ) ;
173173
174174 let job = tls:: with_related_context ( tcx, |icx| QueryJob :: new ( id, span, icx. query ) ) ;
175175
@@ -498,7 +498,7 @@ impl<'tcx> TyCtxt<'tcx> {
498498
499499 let ( ( result, dep_node_index) , diagnostics) = with_diagnostics ( |diagnostics| {
500500 self . start_query ( job. id , diagnostics, |tcx| {
501- tcx. dep_graph . with_anon_task ( Q :: dep_kind ( ) , || Q :: compute ( tcx, key) )
501+ tcx. dep_graph . with_anon_task ( Q :: DEP_KIND , || Q :: compute ( tcx, key) )
502502 } )
503503 } ) ;
504504
@@ -873,7 +873,7 @@ macro_rules! define_queries_inner {
873873 job: job. id,
874874 shard: u16 :: try_from( shard_id) . unwrap( ) ,
875875 kind:
876- <queries:: $name<' tcx> as QueryAccessors <' tcx>>:: dep_kind ( ) ,
876+ <queries:: $name<' tcx> as QueryAccessors <' tcx>>:: DEP_KIND ,
877877 } ;
878878 let info = QueryInfo {
879879 span: job. span,
@@ -980,6 +980,7 @@ macro_rules! define_queries_inner {
980980 impl <$tcx> QueryAccessors <$tcx> for queries:: $name<$tcx> {
981981 const ANON : bool = is_anon!( [ $( $modifiers) * ] ) ;
982982 const EVAL_ALWAYS : bool = is_eval_always!( [ $( $modifiers) * ] ) ;
983+ const DEP_KIND : dep_graph:: DepKind = dep_graph:: DepKind :: $node;
983984
984985 type Cache = query_storage!( [ $( $modifiers) * ] [ $K, $V] ) ;
985986
@@ -999,11 +1000,6 @@ macro_rules! define_queries_inner {
9991000 DepConstructor :: $node( tcx, * key)
10001001 }
10011002
1002- #[ inline( always) ]
1003- fn dep_kind( ) -> dep_graph:: DepKind {
1004- dep_graph:: DepKind :: $node
1005- }
1006-
10071003 #[ inline]
10081004 fn compute( tcx: TyCtxt <' tcx>, key: Self :: Key ) -> Self :: Value {
10091005 __query_compute:: $name( tcx, key)
0 commit comments