@@ -154,7 +154,7 @@ impl<'tcx, Q: QueryDescription<'tcx>> JobOwner<'tcx, Q> {
154
154
} ;
155
155
156
156
// 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 ) ;
158
158
159
159
( job. latch ( id) , _query_blocked_prof_timer)
160
160
}
@@ -169,7 +169,7 @@ impl<'tcx, Q: QueryDescription<'tcx>> JobOwner<'tcx, Q> {
169
169
lock. jobs = id;
170
170
let id = QueryShardJobId ( NonZeroU32 :: new ( id) . unwrap ( ) ) ;
171
171
172
- let global_id = QueryJobId :: new ( id, lookup. shard , Q :: dep_kind ( ) ) ;
172
+ let global_id = QueryJobId :: new ( id, lookup. shard , Q :: DEP_KIND ) ;
173
173
174
174
let job = tls:: with_related_context ( tcx, |icx| QueryJob :: new ( id, span, icx. query ) ) ;
175
175
@@ -498,7 +498,7 @@ impl<'tcx> TyCtxt<'tcx> {
498
498
499
499
let ( ( result, dep_node_index) , diagnostics) = with_diagnostics ( |diagnostics| {
500
500
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) )
502
502
} )
503
503
} ) ;
504
504
@@ -873,7 +873,7 @@ macro_rules! define_queries_inner {
873
873
job: job. id,
874
874
shard: u16 :: try_from( shard_id) . unwrap( ) ,
875
875
kind:
876
- <queries:: $name<' tcx> as QueryAccessors <' tcx>>:: dep_kind ( ) ,
876
+ <queries:: $name<' tcx> as QueryAccessors <' tcx>>:: DEP_KIND ,
877
877
} ;
878
878
let info = QueryInfo {
879
879
span: job. span,
@@ -961,6 +961,7 @@ macro_rules! define_queries_inner {
961
961
impl <$tcx> QueryAccessors <$tcx> for queries:: $name<$tcx> {
962
962
const ANON : bool = is_anon!( [ $( $modifiers) * ] ) ;
963
963
const EVAL_ALWAYS : bool = is_eval_always!( [ $( $modifiers) * ] ) ;
964
+ const DEP_KIND : dep_graph:: DepKind = dep_graph:: DepKind :: $node;
964
965
965
966
type Cache = query_storage!( [ $( $modifiers) * ] [ $K, $V] ) ;
966
967
@@ -980,11 +981,6 @@ macro_rules! define_queries_inner {
980
981
DepConstructor :: $node( tcx, * key)
981
982
}
982
983
983
- #[ inline( always) ]
984
- fn dep_kind( ) -> dep_graph:: DepKind {
985
- dep_graph:: DepKind :: $node
986
- }
987
-
988
984
#[ inline]
989
985
fn compute( tcx: TyCtxt <' tcx>, key: Self :: Key ) -> Self :: Value {
990
986
let provider = tcx. queries. providers. get( key. query_crate( ) )
0 commit comments