2
2
//! generate the actual methods on tcx which find and execute the provider,
3
3
//! manage the caches, and so forth.
4
4
5
- use crate :: dep_graph:: { DepContext , DepKind , DepNode } ;
5
+ use crate :: dep_graph:: { DepKind , DepNode } ;
6
6
use crate :: dep_graph:: { DepNodeIndex , SerializedDepNodeIndex } ;
7
7
use crate :: query:: caches:: QueryCache ;
8
8
use crate :: query:: config:: { QueryContext , QueryDescription } ;
9
9
use crate :: query:: job:: { QueryInfo , QueryJob , QueryJobId , QueryJobInfo , QueryShardJobId } ;
10
- use crate :: HashStableContextProvider ;
11
10
12
11
#[ cfg( not( parallel_compiler) ) ]
13
12
use rustc_data_structures:: cold_path;
@@ -382,17 +381,15 @@ where
382
381
}
383
382
384
383
#[ inline( always) ]
385
- fn try_execute_query < Q , CTX , K > (
384
+ fn try_execute_query < Q , CTX > (
386
385
tcx : CTX ,
387
386
span : Span ,
388
387
key : Q :: Key ,
389
388
lookup : QueryLookup < ' _ , CTX , Q :: Key , <Q :: Cache as QueryCache < CTX > >:: Sharded > ,
390
389
) -> Q :: Value
391
390
where
392
391
Q : QueryDescription < CTX > ,
393
- CTX : QueryContext < DepKind = K > ,
394
- CTX : HashStableContextProvider < <CTX as DepContext >:: StableHashingContext > ,
395
- K : DepKind ,
392
+ CTX : QueryContext ,
396
393
{
397
394
let job = match JobOwner :: try_start :: < Q , _ > ( tcx, span, & key, lookup) {
398
395
TryGetJob :: NotYetStarted ( job) => job,
@@ -408,7 +405,7 @@ where
408
405
// expensive for some `DepKind`s.
409
406
if !tcx. dep_graph ( ) . is_fully_enabled ( ) {
410
407
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 ;
412
409
}
413
410
414
411
if Q :: ANON {
@@ -460,7 +457,7 @@ where
460
457
}
461
458
}
462
459
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) ;
464
461
tcx. dep_graph ( ) . read_index ( dep_node_index) ;
465
462
result
466
463
}
@@ -554,17 +551,15 @@ fn incremental_verify_ich<Q, CTX>(
554
551
}
555
552
556
553
#[ inline( always) ]
557
- fn force_query_with_job < Q , CTX , K > (
554
+ fn force_query_with_job < Q , CTX > (
558
555
tcx : CTX ,
559
556
key : Q :: Key ,
560
557
job : JobOwner < ' _ , CTX , Q :: Cache > ,
561
558
dep_node : DepNode < CTX :: DepKind > ,
562
559
) -> ( Q :: Value , DepNodeIndex )
563
560
where
564
561
Q : QueryDescription < CTX > ,
565
- CTX : QueryContext < DepKind = K > ,
566
- CTX : HashStableContextProvider < <CTX as DepContext >:: StableHashingContext > ,
567
- K : DepKind ,
562
+ CTX : QueryContext ,
568
563
{
569
564
// If the following assertion triggers, it can have two reasons:
570
565
// 1. Something is wrong with DepNode creation, either here or
@@ -631,11 +626,9 @@ pub trait QueryGetter: QueryContext {
631
626
) ;
632
627
}
633
628
634
- impl < CTX , K > QueryGetter for CTX
629
+ impl < CTX > QueryGetter for CTX
635
630
where
636
- CTX : QueryContext < DepKind = K > ,
637
- CTX : HashStableContextProvider < <CTX as DepContext >:: StableHashingContext > ,
638
- K : DepKind ,
631
+ CTX : QueryContext ,
639
632
{
640
633
#[ inline( never) ]
641
634
fn get_query < Q : QueryDescription < Self > > ( self , span : Span , key : Q :: Key ) -> Q :: Value {
@@ -649,7 +642,7 @@ where
649
642
self . dep_graph ( ) . read_index ( index) ;
650
643
value. clone ( )
651
644
} ,
652
- |key, lookup| try_execute_query :: < Q , _ , _ > ( self , span, key, lookup) ,
645
+ |key, lookup| try_execute_query :: < Q , _ > ( self , span, key, lookup) ,
653
646
)
654
647
}
655
648
@@ -710,7 +703,7 @@ where
710
703
#[ cfg( parallel_compiler) ]
711
704
TryGetJob :: JobCompleted ( _) => return ,
712
705
} ;
713
- force_query_with_job :: < Q , _ , _ > ( self , key, job, dep_node) ;
706
+ force_query_with_job :: < Q , _ > ( self , key, job, dep_node) ;
714
707
} ,
715
708
) ;
716
709
}
0 commit comments