@@ -33,15 +33,15 @@ where
3333/// Shared implementation of `tcx.$query(..)` and `tcx.at(span).$query(..)`
3434/// for all queries.
3535#[ inline( always) ]
36- pub ( crate ) fn query_get_at < ' tcx , Cache > (
36+ pub ( crate ) fn query_get_at < ' tcx , C > (
3737 tcx : TyCtxt < ' tcx > ,
38- execute_query : fn ( TyCtxt < ' tcx > , Span , Cache :: Key , QueryMode ) -> Option < Cache :: Value > ,
39- query_cache : & Cache ,
38+ execute_query : fn ( TyCtxt < ' tcx > , Span , C :: Key , QueryMode ) -> Option < C :: Value > ,
39+ query_cache : & C ,
4040 span : Span ,
41- key : Cache :: Key ,
42- ) -> Cache :: Value
41+ key : C :: Key ,
42+ ) -> C :: Value
4343where
44- Cache : QueryCache ,
44+ C : QueryCache ,
4545{
4646 match try_get_cached ( tcx, query_cache, & key) {
4747 Some ( value) => value,
@@ -52,14 +52,14 @@ where
5252/// Shared implementation of `tcx.ensure_ok().$query(..)` for most queries,
5353/// and `tcx.ensure_done().$query(..)` for all queries.
5454#[ inline]
55- pub ( crate ) fn query_ensure < ' tcx , Cache > (
55+ pub ( crate ) fn query_ensure < ' tcx , C > (
5656 tcx : TyCtxt < ' tcx > ,
57- execute_query : fn ( TyCtxt < ' tcx > , Span , Cache :: Key , QueryMode ) -> Option < Cache :: Value > ,
58- query_cache : & Cache ,
59- key : Cache :: Key ,
57+ execute_query : fn ( TyCtxt < ' tcx > , Span , C :: Key , QueryMode ) -> Option < C :: Value > ,
58+ query_cache : & C ,
59+ key : C :: Key ,
6060 ensure_mode : EnsureMode ,
6161) where
62- Cache : QueryCache ,
62+ C : QueryCache ,
6363{
6464 if try_get_cached ( tcx, query_cache, & key) . is_none ( ) {
6565 execute_query ( tcx, DUMMY_SP , key, QueryMode :: Ensure { ensure_mode } ) ;
@@ -69,17 +69,17 @@ pub(crate) fn query_ensure<'tcx, Cache>(
6969/// Shared implementation of `tcx.ensure_ok().$query(..)` for queries that
7070/// have the `return_result_from_ensure_ok` modifier.
7171#[ inline]
72- pub ( crate ) fn query_ensure_error_guaranteed < ' tcx , Cache , T > (
72+ pub ( crate ) fn query_ensure_error_guaranteed < ' tcx , C , T > (
7373 tcx : TyCtxt < ' tcx > ,
74- execute_query : fn ( TyCtxt < ' tcx > , Span , Cache :: Key , QueryMode ) -> Option < Cache :: Value > ,
75- query_cache : & Cache ,
76- key : Cache :: Key ,
74+ execute_query : fn ( TyCtxt < ' tcx > , Span , C :: Key , QueryMode ) -> Option < C :: Value > ,
75+ query_cache : & C ,
76+ key : C :: Key ,
7777 // This arg is needed to match the signature of `query_ensure`,
7878 // but should always be `EnsureMode::Ok`.
7979 ensure_mode : EnsureMode ,
8080) -> Result < ( ) , ErrorGuaranteed >
8181where
82- Cache : QueryCache < Value = Erased < Result < T , ErrorGuaranteed > > > ,
82+ C : QueryCache < Value = Erased < Result < T , ErrorGuaranteed > > > ,
8383 Result < T , ErrorGuaranteed > : Erasable ,
8484{
8585 assert_matches ! ( ensure_mode, EnsureMode :: Ok ) ;
@@ -101,15 +101,15 @@ where
101101}
102102
103103/// Common implementation of query feeding, used by `define_feedable!`.
104- pub ( crate ) fn query_feed < ' tcx , Cache > (
104+ pub ( crate ) fn query_feed < ' tcx , C > (
105105 tcx : TyCtxt < ' tcx > ,
106106 dep_kind : DepKind ,
107- query_vtable : & QueryVTable < ' tcx , Cache > ,
108- key : Cache :: Key ,
109- value : Cache :: Value ,
107+ query_vtable : & QueryVTable < ' tcx , C > ,
108+ key : C :: Key ,
109+ value : C :: Value ,
110110) where
111- Cache : QueryCache ,
112- Cache :: Key : DepNodeKey < ' tcx > ,
111+ C : QueryCache ,
112+ C :: Key : DepNodeKey < ' tcx > ,
113113{
114114 let format_value = query_vtable. format_value ;
115115
0 commit comments