|
13 | 13 | // seems likely that they should eventually be merged into more
|
14 | 14 | // general routines.
|
15 | 15 |
|
16 |
| -use dep_graph::{DepGraph, DepKind, DepTrackingMap, DepTrackingMapConfig}; |
| 16 | +use dep_graph::{DepKind, DepTrackingMapConfig}; |
17 | 17 | use infer::TransNormalize;
|
18 |
| -use std::cell::RefCell; |
19 | 18 | use std::marker::PhantomData;
|
20 | 19 | use syntax_pos::DUMMY_SP;
|
21 | 20 | use traits::{FulfillmentContext, Obligation, ObligationCause, SelectionContext, Vtable};
|
22 | 21 | use ty::{self, Ty, TyCtxt};
|
23 | 22 | use ty::subst::{Subst, Substs};
|
24 | 23 | use ty::fold::{TypeFoldable, TypeFolder};
|
25 |
| -use util::common::MemoizationMap; |
26 | 24 |
|
27 | 25 | /// Attempts to resolve an obligation to a vtable.. The result is
|
28 | 26 | /// a shallow vtable resolution -- meaning that we do not
|
@@ -136,20 +134,6 @@ impl<'a, 'gcx> TypeFolder<'gcx, 'gcx> for AssociatedTypeNormalizer<'a, 'gcx> {
|
136 | 134 | }
|
137 | 135 | }
|
138 | 136 |
|
139 |
| -/// Specializes caches used in trans -- in particular, they assume all |
140 |
| -/// types are fully monomorphized and that free regions can be erased. |
141 |
| -pub struct TransTraitCaches<'tcx> { |
142 |
| - project_cache: RefCell<DepTrackingMap<ProjectionCache<'tcx>>>, |
143 |
| -} |
144 |
| - |
145 |
| -impl<'tcx> TransTraitCaches<'tcx> { |
146 |
| - pub fn new(graph: DepGraph) -> Self { |
147 |
| - TransTraitCaches { |
148 |
| - project_cache: RefCell::new(DepTrackingMap::new(graph)), |
149 |
| - } |
150 |
| - } |
151 |
| -} |
152 |
| - |
153 | 137 | // Implement DepTrackingMapConfig for `trait_cache`
|
154 | 138 | pub struct TraitSelectionCache<'tcx> {
|
155 | 139 | data: PhantomData<&'tcx ()>
|
|
0 commit comments