@@ -11,11 +11,6 @@ use rustc_data_structures::sync::WorkerLocal;
1111use std:: default:: Default ;
1212use std:: fmt:: Debug ;
1313use std:: hash:: Hash ;
14- use std:: marker:: PhantomData ;
15-
16- pub trait CacheSelector < K , V > {
17- type Cache ;
18- }
1914
2015pub trait QueryStorage {
2116 type Value : Debug ;
@@ -47,12 +42,6 @@ pub trait QueryCache: QueryStorage + Sized {
4742 fn iter ( & self , f : & mut dyn FnMut ( & Self :: Key , & Self :: Value , DepNodeIndex ) ) ;
4843}
4944
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-
5645pub struct DefaultCache < K , V > {
5746 #[ cfg( parallel_compiler) ]
5847 cache : Sharded < FxHashMap < K , ( V , DepNodeIndex ) > > ,
@@ -134,12 +123,6 @@ where
134123 }
135124}
136125
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-
143126pub struct ArenaCache < ' tcx , K , V > {
144127 arena : WorkerLocal < TypedArena < ( V , DepNodeIndex ) > > ,
145128 #[ cfg( parallel_compiler) ]
0 commit comments