@@ -11,11 +11,6 @@ use rustc_data_structures::sync::WorkerLocal;
11
11
use std:: default:: Default ;
12
12
use std:: fmt:: Debug ;
13
13
use std:: hash:: Hash ;
14
- use std:: marker:: PhantomData ;
15
-
16
- pub trait CacheSelector < K , V > {
17
- type Cache ;
18
- }
19
14
20
15
pub trait QueryStorage {
21
16
type Value : Debug ;
@@ -47,12 +42,6 @@ pub trait QueryCache: QueryStorage + Sized {
47
42
fn iter ( & self , f : & mut dyn FnMut ( & Self :: Key , & Self :: Value , DepNodeIndex ) ) ;
48
43
}
49
44
50
- pub struct DefaultCacheSelector ;
51
-
52
- impl < K : Eq + Hash , V : Clone > CacheSelector < K , V > for DefaultCacheSelector {
53
- type Cache = DefaultCache < K , V > ;
54
- }
55
-
56
45
pub struct DefaultCache < K , V > {
57
46
#[ cfg( parallel_compiler) ]
58
47
cache : Sharded < FxHashMap < K , ( V , DepNodeIndex ) > > ,
@@ -134,12 +123,6 @@ where
134
123
}
135
124
}
136
125
137
- pub struct ArenaCacheSelector < ' tcx > ( PhantomData < & ' tcx ( ) > ) ;
138
-
139
- impl < ' tcx , K : Eq + Hash , V : ' tcx > CacheSelector < K , V > for ArenaCacheSelector < ' tcx > {
140
- type Cache = ArenaCache < ' tcx , K , V > ;
141
- }
142
-
143
126
pub struct ArenaCache < ' tcx , K , V > {
144
127
arena : WorkerLocal < TypedArena < ( V , DepNodeIndex ) > > ,
145
128
#[ cfg( parallel_compiler) ]
0 commit comments