@@ -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,
@@ -980,6 +980,7 @@ macro_rules! define_queries_inner {
980
980
impl <$tcx> QueryAccessors <$tcx> for queries:: $name<$tcx> {
981
981
const ANON : bool = is_anon!( [ $( $modifiers) * ] ) ;
982
982
const EVAL_ALWAYS : bool = is_eval_always!( [ $( $modifiers) * ] ) ;
983
+ const DEP_KIND : dep_graph:: DepKind = dep_graph:: DepKind :: $node;
983
984
984
985
type Cache = query_storage!( [ $( $modifiers) * ] [ $K, $V] ) ;
985
986
@@ -999,11 +1000,6 @@ macro_rules! define_queries_inner {
999
1000
DepConstructor :: $node( tcx, * key)
1000
1001
}
1001
1002
1002
- #[ inline( always) ]
1003
- fn dep_kind( ) -> dep_graph:: DepKind {
1004
- dep_graph:: DepKind :: $node
1005
- }
1006
-
1007
1003
#[ inline]
1008
1004
fn compute( tcx: TyCtxt <' tcx>, key: Self :: Key ) -> Self :: Value {
1009
1005
__query_compute:: $name( tcx, key)
0 commit comments