@@ -191,7 +191,7 @@ where
191
191
} ;
192
192
193
193
// 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 ) ;
195
195
196
196
( job. latch ( id) , _query_blocked_prof_timer)
197
197
}
@@ -206,7 +206,7 @@ where
206
206
lock. jobs = id;
207
207
let id = QueryShardJobId ( NonZeroU32 :: new ( id) . unwrap ( ) ) ;
208
208
209
- let global_id = QueryJobId :: new ( id, lookup. shard , Q :: dep_kind ( ) ) ;
209
+ let global_id = QueryJobId :: new ( id, lookup. shard , Q :: DEP_KIND ) ;
210
210
211
211
let job = tls:: with_related_context ( tcx, |icx| QueryJob :: new ( id, span, icx. query ) ) ;
212
212
@@ -540,7 +540,7 @@ impl<'tcx> TyCtxt<'tcx> {
540
540
541
541
let ( ( result, dep_node_index) , diagnostics) = with_diagnostics ( |diagnostics| {
542
542
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) )
544
544
} )
545
545
} ) ;
546
546
@@ -916,7 +916,7 @@ macro_rules! define_queries_inner {
916
916
job: job. id,
917
917
shard: u16 :: try_from( shard_id) . unwrap( ) ,
918
918
kind:
919
- <queries:: $name<' tcx> as QueryAccessors <' tcx>>:: dep_kind ( ) ,
919
+ <queries:: $name<' tcx> as QueryAccessors <' tcx>>:: DEP_KIND ,
920
920
} ;
921
921
let info = QueryInfo {
922
922
span: job. span,
@@ -1023,6 +1023,7 @@ macro_rules! define_queries_inner {
1023
1023
impl <$tcx> QueryAccessors <$tcx> for queries:: $name<$tcx> {
1024
1024
const ANON : bool = is_anon!( [ $( $modifiers) * ] ) ;
1025
1025
const EVAL_ALWAYS : bool = is_eval_always!( [ $( $modifiers) * ] ) ;
1026
+ const DEP_KIND : dep_graph:: DepKind = dep_graph:: DepKind :: $node;
1026
1027
1027
1028
type Cache = query_storage!( [ $( $modifiers) * ] [ $K, $V] ) ;
1028
1029
@@ -1042,11 +1043,6 @@ macro_rules! define_queries_inner {
1042
1043
DepConstructor :: $node( tcx, * key)
1043
1044
}
1044
1045
1045
- #[ inline( always) ]
1046
- fn dep_kind( ) -> dep_graph:: DepKind {
1047
- dep_graph:: DepKind :: $node
1048
- }
1049
-
1050
1046
#[ inline]
1051
1047
fn compute( tcx: TyCtxt <' tcx>, key: Self :: Key ) -> Self :: Value {
1052
1048
__query_compute:: $name( tcx, key)
0 commit comments