@@ -23,10 +23,6 @@ pub trait CacheSelector<'tcx, V> {
23
23
pub trait QueryStorage {
24
24
type Value : Debug ;
25
25
type Stored : Copy ;
26
-
27
- /// Store a value without putting it in the cache.
28
- /// This is meant to be used with cycle errors.
29
- fn store_nocache ( & self , value : Self :: Value ) -> Self :: Stored ;
30
26
}
31
27
32
28
pub trait QueryCache : QueryStorage + Sized {
@@ -68,12 +64,6 @@ impl<K, V> Default for DefaultCache<K, V> {
68
64
impl < K : Eq + Hash , V : Copy + Debug > QueryStorage for DefaultCache < K , V > {
69
65
type Value = V ;
70
66
type Stored = V ;
71
-
72
- #[ inline]
73
- fn store_nocache ( & self , value : Self :: Value ) -> Self :: Stored {
74
- // We have no dedicated storage
75
- value
76
- }
77
67
}
78
68
79
69
impl < K , V > QueryCache for DefaultCache < K , V >
@@ -144,13 +134,6 @@ impl<'tcx, K, V> Default for ArenaCache<'tcx, K, V> {
144
134
impl < ' tcx , K : Eq + Hash , V : Debug + ' tcx > QueryStorage for ArenaCache < ' tcx , K , V > {
145
135
type Value = V ;
146
136
type Stored = & ' tcx V ;
147
-
148
- #[ inline]
149
- fn store_nocache ( & self , value : Self :: Value ) -> Self :: Stored {
150
- let value = self . arena . alloc ( ( value, DepNodeIndex :: INVALID ) ) ;
151
- let value = unsafe { & * ( & value. 0 as * const _ ) } ;
152
- & value
153
- }
154
137
}
155
138
156
139
impl < ' tcx , K , V : ' tcx > QueryCache for ArenaCache < ' tcx , K , V >
@@ -231,12 +214,6 @@ impl<K: Idx, V> Default for VecCache<K, V> {
231
214
impl < K : Eq + Idx , V : Copy + Debug > QueryStorage for VecCache < K , V > {
232
215
type Value = V ;
233
216
type Stored = V ;
234
-
235
- #[ inline]
236
- fn store_nocache ( & self , value : Self :: Value ) -> Self :: Stored {
237
- // We have no dedicated storage
238
- value
239
- }
240
217
}
241
218
242
219
impl < K , V > QueryCache for VecCache < K , V >
@@ -309,13 +286,6 @@ impl<'tcx, K: Idx, V> Default for VecArenaCache<'tcx, K, V> {
309
286
impl < ' tcx , K : Eq + Idx , V : Debug + ' tcx > QueryStorage for VecArenaCache < ' tcx , K , V > {
310
287
type Value = V ;
311
288
type Stored = & ' tcx V ;
312
-
313
- #[ inline]
314
- fn store_nocache ( & self , value : Self :: Value ) -> Self :: Stored {
315
- let value = self . arena . alloc ( ( value, DepNodeIndex :: INVALID ) ) ;
316
- let value = unsafe { & * ( & value. 0 as * const _ ) } ;
317
- & value
318
- }
319
289
}
320
290
321
291
impl < ' tcx , K , V : ' tcx > QueryCache for VecArenaCache < ' tcx , K , V >
0 commit comments