22//! generate the actual methods on tcx which find and execute the provider,
33//! manage the caches, and so forth.
44
5- use crate :: dep_graph:: { DepContext , DepKind , DepNode } ;
5+ use crate :: dep_graph:: { DepKind , DepNode } ;
66use crate :: dep_graph:: { DepNodeIndex , SerializedDepNodeIndex } ;
77use crate :: query:: caches:: QueryCache ;
88use crate :: query:: config:: { QueryContext , QueryDescription } ;
99use crate :: query:: job:: { QueryInfo , QueryJob , QueryJobId , QueryJobInfo , QueryShardJobId } ;
10- use crate :: HashStableContextProvider ;
1110
1211#[ cfg( not( parallel_compiler) ) ]
1312use rustc_data_structures:: cold_path;
@@ -382,17 +381,15 @@ where
382381}
383382
384383#[ inline( always) ]
385- fn try_execute_query < Q , CTX , K > (
384+ fn try_execute_query < Q , CTX > (
386385 tcx : CTX ,
387386 span : Span ,
388387 key : Q :: Key ,
389388 lookup : QueryLookup < ' _ , CTX , Q :: Key , <Q :: Cache as QueryCache < CTX > >:: Sharded > ,
390389) -> Q :: Value
391390where
392391 Q : QueryDescription < CTX > ,
393- CTX : QueryContext < DepKind = K > ,
394- CTX : HashStableContextProvider < <CTX as DepContext >:: StableHashingContext > ,
395- K : DepKind ,
392+ CTX : QueryContext ,
396393{
397394 let job = match JobOwner :: try_start :: < Q , _ > ( tcx, span, & key, lookup) {
398395 TryGetJob :: NotYetStarted ( job) => job,
@@ -408,7 +405,7 @@ where
408405 // expensive for some `DepKind`s.
409406 if !tcx. dep_graph ( ) . is_fully_enabled ( ) {
410407 let null_dep_node = DepNode :: new_no_params ( DepKind :: NULL ) ;
411- return force_query_with_job :: < Q , _ , _ > ( tcx, key, job, null_dep_node) . 0 ;
408+ return force_query_with_job :: < Q , _ > ( tcx, key, job, null_dep_node) . 0 ;
412409 }
413410
414411 if Q :: ANON {
@@ -460,7 +457,7 @@ where
460457 }
461458 }
462459
463- let ( result, dep_node_index) = force_query_with_job :: < Q , _ , _ > ( tcx, key, job, dep_node) ;
460+ let ( result, dep_node_index) = force_query_with_job :: < Q , _ > ( tcx, key, job, dep_node) ;
464461 tcx. dep_graph ( ) . read_index ( dep_node_index) ;
465462 result
466463}
@@ -554,17 +551,15 @@ fn incremental_verify_ich<Q, CTX>(
554551}
555552
556553#[ inline( always) ]
557- fn force_query_with_job < Q , CTX , K > (
554+ fn force_query_with_job < Q , CTX > (
558555 tcx : CTX ,
559556 key : Q :: Key ,
560557 job : JobOwner < ' _ , CTX , Q :: Cache > ,
561558 dep_node : DepNode < CTX :: DepKind > ,
562559) -> ( Q :: Value , DepNodeIndex )
563560where
564561 Q : QueryDescription < CTX > ,
565- CTX : QueryContext < DepKind = K > ,
566- CTX : HashStableContextProvider < <CTX as DepContext >:: StableHashingContext > ,
567- K : DepKind ,
562+ CTX : QueryContext ,
568563{
569564 // If the following assertion triggers, it can have two reasons:
570565 // 1. Something is wrong with DepNode creation, either here or
@@ -631,11 +626,9 @@ pub trait QueryGetter: QueryContext {
631626 ) ;
632627}
633628
634- impl < CTX , K > QueryGetter for CTX
629+ impl < CTX > QueryGetter for CTX
635630where
636- CTX : QueryContext < DepKind = K > ,
637- CTX : HashStableContextProvider < <CTX as DepContext >:: StableHashingContext > ,
638- K : DepKind ,
631+ CTX : QueryContext ,
639632{
640633 #[ inline( never) ]
641634 fn get_query < Q : QueryDescription < Self > > ( self , span : Span , key : Q :: Key ) -> Q :: Value {
@@ -649,7 +642,7 @@ where
649642 self . dep_graph ( ) . read_index ( index) ;
650643 value. clone ( )
651644 } ,
652- |key, lookup| try_execute_query :: < Q , _ , _ > ( self , span, key, lookup) ,
645+ |key, lookup| try_execute_query :: < Q , _ > ( self , span, key, lookup) ,
653646 )
654647 }
655648
@@ -710,7 +703,7 @@ where
710703 #[ cfg( parallel_compiler) ]
711704 TryGetJob :: JobCompleted ( _) => return ,
712705 } ;
713- force_query_with_job :: < Q , _ , _ > ( self , key, job, dep_node) ;
706+ force_query_with_job :: < Q , _ > ( self , key, job, dep_node) ;
714707 } ,
715708 ) ;
716709 }
0 commit comments