@@ -17,8 +17,7 @@ use rustc_middle::ty::{self, TyCtxt};
17
17
use rustc_query_system:: dep_graph:: { DepNodeParams , HasDepContext } ;
18
18
use rustc_query_system:: ich:: StableHashingContext ;
19
19
use rustc_query_system:: query:: {
20
- force_query, QueryConfig , QueryContext , QueryDescription , QueryJobId , QueryMap ,
21
- QuerySideEffects , QueryStackFrame ,
20
+ force_query, QueryConfig , QueryContext , QueryJobId , QueryMap , QuerySideEffects , QueryStackFrame ,
22
21
} ;
23
22
use rustc_query_system:: { LayoutOfDepth , QueryOverflow , Value } ;
24
23
use rustc_serialize:: Decodable ;
@@ -340,7 +339,7 @@ pub(crate) fn create_query_frame<
340
339
341
340
fn try_load_from_on_disk_cache < ' tcx , Q > ( tcx : TyCtxt < ' tcx > , dep_node : DepNode )
342
341
where
343
- Q : QueryDescription < QueryCtxt < ' tcx > > ,
342
+ Q : QueryConfig < QueryCtxt < ' tcx > > ,
344
343
Q :: Key : DepNodeParams < TyCtxt < ' tcx > > ,
345
344
{
346
345
debug_assert ! ( tcx. dep_graph. is_green( & dep_node) ) ;
@@ -365,7 +364,7 @@ where
365
364
366
365
fn force_from_dep_node < ' tcx , Q > ( tcx : TyCtxt < ' tcx > , dep_node : DepNode ) -> bool
367
366
where
368
- Q : QueryDescription < QueryCtxt < ' tcx > > ,
367
+ Q : QueryConfig < QueryCtxt < ' tcx > > ,
369
368
Q :: Key : DepNodeParams < TyCtxt < ' tcx > > ,
370
369
Q :: Value : Value < TyCtxt < ' tcx > > ,
371
370
{
@@ -398,12 +397,9 @@ where
398
397
}
399
398
}
400
399
401
- pub ( crate ) fn query_callback < ' tcx , Q : QueryConfig > (
402
- is_anon : bool ,
403
- is_eval_always : bool ,
404
- ) -> DepKindStruct < ' tcx >
400
+ pub ( crate ) fn query_callback < ' tcx , Q > ( is_anon : bool , is_eval_always : bool ) -> DepKindStruct < ' tcx >
405
401
where
406
- Q : QueryDescription < QueryCtxt < ' tcx > > ,
402
+ Q : QueryConfig < QueryCtxt < ' tcx > > ,
407
403
Q :: Key : DepNodeParams < TyCtxt < ' tcx > > ,
408
404
{
409
405
let fingerprint_style = Q :: Key :: fingerprint_style ( ) ;
@@ -458,14 +454,12 @@ macro_rules! define_queries {
458
454
} ) *
459
455
}
460
456
461
- $( impl <' tcx> QueryConfig for queries:: $name<' tcx> {
457
+ $( impl <' tcx> QueryConfig < QueryCtxt < ' tcx>> for queries:: $name<' tcx> {
462
458
type Key = query_keys:: $name<' tcx>;
463
459
type Value = query_values:: $name<' tcx>;
464
460
type Stored = query_stored:: $name<' tcx>;
465
461
const NAME : & ' static str = stringify!( $name) ;
466
- }
467
462
468
- impl <' tcx> QueryDescription <QueryCtxt <' tcx>> for queries:: $name<' tcx> {
469
463
#[ inline]
470
464
fn cache_on_disk( tcx: TyCtxt <' tcx>, key: & Self :: Key ) -> bool {
471
465
:: rustc_middle:: query:: cached:: $name( tcx, key)
@@ -662,12 +656,15 @@ macro_rules! define_queries_struct {
662
656
local_providers: Box <Providers >,
663
657
extern_providers: Box <ExternProviders >,
664
658
query_structs: Vec <$crate:: plumbing:: QueryStruct <' tcx>>,
665
-
666
659
pub on_disk_cache: Option <OnDiskCache <' tcx>>,
667
-
668
660
jobs: AtomicU64 ,
669
661
670
- $( $( #[ $attr] ) * $name: QueryState <<queries:: $name<' tcx> as QueryConfig >:: Key >, ) *
662
+ $(
663
+ $( #[ $attr] ) *
664
+ $name: QueryState <
665
+ <queries:: $name<' tcx> as QueryConfig <QueryCtxt <' tcx>>>:: Key
666
+ >,
667
+ ) *
671
668
}
672
669
673
670
impl <' tcx> Queries <' tcx> {
@@ -704,7 +701,7 @@ macro_rules! define_queries_struct {
704
701
& ' tcx self ,
705
702
tcx: TyCtxt <' tcx>,
706
703
span: Span ,
707
- key: <queries:: $name<' tcx> as QueryConfig >:: Key ,
704
+ key: <queries:: $name<' tcx> as QueryConfig < QueryCtxt < ' tcx>> >:: Key ,
708
705
mode: QueryMode ,
709
706
) -> Option <query_stored:: $name<' tcx>> {
710
707
let qcx = QueryCtxt { tcx, queries: self } ;
0 commit comments