@@ -17,8 +17,7 @@ use rustc_middle::ty::{self, TyCtxt};
1717use rustc_query_system:: dep_graph:: { DepNodeParams , HasDepContext } ;
1818use rustc_query_system:: ich:: StableHashingContext ;
1919use rustc_query_system:: query:: {
20- force_query, QueryConfig , QueryContext , QueryDescription , QueryJobId , QueryMap ,
21- QuerySideEffects , QueryStackFrame ,
20+ force_query, QueryConfig , QueryContext , QueryJobId , QueryMap , QuerySideEffects , QueryStackFrame ,
2221} ;
2322use rustc_query_system:: { LayoutOfDepth , QueryOverflow , Value } ;
2423use rustc_serialize:: Decodable ;
@@ -340,7 +339,7 @@ pub(crate) fn create_query_frame<
340339
341340fn try_load_from_on_disk_cache < ' tcx , Q > ( tcx : TyCtxt < ' tcx > , dep_node : DepNode )
342341where
343- Q : QueryDescription < QueryCtxt < ' tcx > > ,
342+ Q : QueryConfig < QueryCtxt < ' tcx > > ,
344343 Q :: Key : DepNodeParams < TyCtxt < ' tcx > > ,
345344{
346345 debug_assert ! ( tcx. dep_graph. is_green( & dep_node) ) ;
@@ -365,7 +364,7 @@ where
365364
366365fn force_from_dep_node < ' tcx , Q > ( tcx : TyCtxt < ' tcx > , dep_node : DepNode ) -> bool
367366where
368- Q : QueryDescription < QueryCtxt < ' tcx > > ,
367+ Q : QueryConfig < QueryCtxt < ' tcx > > ,
369368 Q :: Key : DepNodeParams < TyCtxt < ' tcx > > ,
370369 Q :: Value : Value < TyCtxt < ' tcx > > ,
371370{
@@ -398,12 +397,9 @@ where
398397 }
399398}
400399
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 >
405401where
406- Q : QueryDescription < QueryCtxt < ' tcx > > ,
402+ Q : QueryConfig < QueryCtxt < ' tcx > > ,
407403 Q :: Key : DepNodeParams < TyCtxt < ' tcx > > ,
408404{
409405 let fingerprint_style = Q :: Key :: fingerprint_style ( ) ;
@@ -458,14 +454,12 @@ macro_rules! define_queries {
458454 } ) *
459455 }
460456
461- $( impl <' tcx> QueryConfig for queries:: $name<' tcx> {
457+ $( impl <' tcx> QueryConfig < QueryCtxt < ' tcx>> for queries:: $name<' tcx> {
462458 type Key = query_keys:: $name<' tcx>;
463459 type Value = query_values:: $name<' tcx>;
464460 type Stored = query_stored:: $name<' tcx>;
465461 const NAME : & ' static str = stringify!( $name) ;
466- }
467462
468- impl <' tcx> QueryDescription <QueryCtxt <' tcx>> for queries:: $name<' tcx> {
469463 #[ inline]
470464 fn cache_on_disk( tcx: TyCtxt <' tcx>, key: & Self :: Key ) -> bool {
471465 :: rustc_middle:: query:: cached:: $name( tcx, key)
@@ -662,12 +656,15 @@ macro_rules! define_queries_struct {
662656 local_providers: Box <Providers >,
663657 extern_providers: Box <ExternProviders >,
664658 query_structs: Vec <$crate:: plumbing:: QueryStruct <' tcx>>,
665-
666659 pub on_disk_cache: Option <OnDiskCache <' tcx>>,
667-
668660 jobs: AtomicU64 ,
669661
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+ ) *
671668 }
672669
673670 impl <' tcx> Queries <' tcx> {
@@ -704,7 +701,7 @@ macro_rules! define_queries_struct {
704701 & ' tcx self ,
705702 tcx: TyCtxt <' tcx>,
706703 span: Span ,
707- key: <queries:: $name<' tcx> as QueryConfig >:: Key ,
704+ key: <queries:: $name<' tcx> as QueryConfig < QueryCtxt < ' tcx>> >:: Key ,
708705 mode: QueryMode ,
709706 ) -> Option <query_stored:: $name<' tcx>> {
710707 let qcx = QueryCtxt { tcx, queries: self } ;
0 commit comments