@@ -42,14 +42,14 @@ impl<CTX: QueryContext, K, C: Default> Default for QueryStateShard<CTX, K, C> {
42
42
}
43
43
}
44
44
45
- pub struct QueryState < CTX : QueryContext , C : QueryCache < CTX > > {
45
+ pub struct QueryState < CTX : QueryContext , C : QueryCache > {
46
46
cache : C ,
47
47
shards : Sharded < QueryStateShard < CTX , C :: Key , C :: Sharded > > ,
48
48
#[ cfg( debug_assertions) ]
49
49
pub cache_hits : AtomicUsize ,
50
50
}
51
51
52
- impl < CTX : QueryContext , C : QueryCache < CTX > > QueryState < CTX , C > {
52
+ impl < CTX : QueryContext , C : QueryCache > QueryState < CTX , C > {
53
53
pub ( super ) fn get_lookup < ' tcx > (
54
54
& ' tcx self ,
55
55
key : & C :: Key ,
@@ -77,7 +77,7 @@ enum QueryResult<CTX: QueryContext> {
77
77
Poisoned ,
78
78
}
79
79
80
- impl < CTX : QueryContext , C : QueryCache < CTX > > QueryState < CTX , C > {
80
+ impl < CTX : QueryContext , C : QueryCache > QueryState < CTX , C > {
81
81
pub fn iter_results < R > (
82
82
& self ,
83
83
f : impl for < ' a > FnOnce (
@@ -122,7 +122,7 @@ impl<CTX: QueryContext, C: QueryCache<CTX>> QueryState<CTX, C> {
122
122
}
123
123
}
124
124
125
- impl < CTX : QueryContext , C : QueryCache < CTX > > Default for QueryState < CTX , C > {
125
+ impl < CTX : QueryContext , C : QueryCache > Default for QueryState < CTX , C > {
126
126
fn default ( ) -> QueryState < CTX , C > {
127
127
QueryState {
128
128
cache : C :: default ( ) ,
@@ -144,7 +144,7 @@ pub struct QueryLookup<'tcx, CTX: QueryContext, K, C> {
144
144
/// This will poison the relevant query if dropped.
145
145
struct JobOwner < ' tcx , CTX : QueryContext , C >
146
146
where
147
- C : QueryCache < CTX > ,
147
+ C : QueryCache ,
148
148
C :: Key : Eq + Hash + Clone + Debug ,
149
149
C :: Value : Clone ,
150
150
{
@@ -155,7 +155,7 @@ where
155
155
156
156
impl < ' tcx , CTX : QueryContext , C > JobOwner < ' tcx , CTX , C >
157
157
where
158
- C : QueryCache < CTX > ,
158
+ C : QueryCache ,
159
159
C :: Key : Eq + Hash + Clone + Debug ,
160
160
C :: Value : Clone ,
161
161
{
@@ -292,7 +292,7 @@ where
292
292
( result, diagnostics. into_inner ( ) )
293
293
}
294
294
295
- impl < ' tcx , CTX : QueryContext , C : QueryCache < CTX > > Drop for JobOwner < ' tcx , CTX , C >
295
+ impl < ' tcx , CTX : QueryContext , C : QueryCache > Drop for JobOwner < ' tcx , CTX , C >
296
296
where
297
297
C :: Key : Eq + Hash + Clone + Debug ,
298
298
C :: Value : Clone ,
@@ -326,7 +326,7 @@ pub struct CycleError<Q> {
326
326
}
327
327
328
328
/// The result of `try_start`.
329
- enum TryGetJob < ' tcx , CTX : QueryContext , C : QueryCache < CTX > >
329
+ enum TryGetJob < ' tcx , CTX : QueryContext , C : QueryCache >
330
330
where
331
331
C :: Key : Eq + Hash + Clone + Debug ,
332
332
C :: Value : Clone ,
@@ -358,7 +358,7 @@ fn try_get_cached<CTX, C, R, OnHit, OnMiss>(
358
358
on_miss : OnMiss ,
359
359
) -> R
360
360
where
361
- C : QueryCache < CTX > ,
361
+ C : QueryCache ,
362
362
CTX : QueryContext ,
363
363
OnHit : FnOnce ( & C :: Value , DepNodeIndex ) -> R ,
364
364
OnMiss : FnOnce ( C :: Key , QueryLookup < ' _ , CTX , C :: Key , C :: Sharded > ) -> R ,
@@ -385,7 +385,7 @@ fn try_execute_query<Q, CTX>(
385
385
tcx : CTX ,
386
386
span : Span ,
387
387
key : Q :: Key ,
388
- lookup : QueryLookup < ' _ , CTX , Q :: Key , <Q :: Cache as QueryCache < CTX > >:: Sharded > ,
388
+ lookup : QueryLookup < ' _ , CTX , Q :: Key , <Q :: Cache as QueryCache >:: Sharded > ,
389
389
) -> Q :: Value
390
390
where
391
391
Q : QueryDescription < CTX > ,
0 commit comments