@@ -34,6 +34,7 @@ use middle::ty::{FreevarMap, GenericPredicates};
34
34
use middle:: ty:: { BareFnTy , InferTy , ParamTy , ProjectionTy , TraitTy } ;
35
35
use middle:: ty:: { TyVar , TyVid , IntVar , IntVid , FloatVar , FloatVid } ;
36
36
use middle:: ty:: TypeVariants :: * ;
37
+ use middle:: ty:: maps;
37
38
use util:: nodemap:: { NodeMap , NodeSet , DefIdMap , DefIdSet } ;
38
39
use util:: nodemap:: FnvHashMap ;
39
40
@@ -248,7 +249,7 @@ pub struct ctxt<'tcx> {
248
249
pub tables : RefCell < Tables < ' tcx > > ,
249
250
250
251
/// Maps from a trait item to the trait item "descriptor"
251
- pub impl_or_trait_items : RefCell < DefIdMap < ty :: ImplOrTraitItem < ' tcx > > > ,
252
+ pub impl_or_trait_items : RefCell < DepTrackingMap < maps :: ImplOrTraitItems < ' tcx > > > ,
252
253
253
254
/// Maps from a trait def-id to a list of the def-ids of its trait items
254
255
pub trait_item_def_ids : RefCell < DefIdMap < Rc < Vec < ty:: ImplOrTraitItemId > > > > ,
@@ -274,7 +275,7 @@ pub struct ctxt<'tcx> {
274
275
275
276
pub map : ast_map:: Map < ' tcx > ,
276
277
pub freevars : RefCell < FreevarMap > ,
277
- pub tcache : RefCell < DefIdMap < ty :: TypeScheme < ' tcx > > > ,
278
+ pub tcache : RefCell < DepTrackingMap < maps :: Tcache < ' tcx > > > ,
278
279
pub rcache : RefCell < FnvHashMap < ty:: CReaderCacheKey , Ty < ' tcx > > > ,
279
280
pub tc_cache : RefCell < FnvHashMap < Ty < ' tcx > , ty:: contents:: TypeContents > > ,
280
281
pub ast_ty_to_ty_cache : RefCell < NodeMap < Ty < ' tcx > > > ,
@@ -512,11 +513,11 @@ impl<'tcx> ctxt<'tcx> {
512
513
fulfilled_predicates : RefCell :: new ( traits:: FulfilledPredicates :: new ( ) ) ,
513
514
map : map,
514
515
freevars : RefCell :: new ( freevars) ,
515
- tcache : RefCell :: new ( DefIdMap ( ) ) ,
516
+ tcache : RefCell :: new ( DepTrackingMap :: new ( dep_graph . clone ( ) ) ) ,
516
517
rcache : RefCell :: new ( FnvHashMap ( ) ) ,
517
518
tc_cache : RefCell :: new ( FnvHashMap ( ) ) ,
518
519
ast_ty_to_ty_cache : RefCell :: new ( NodeMap ( ) ) ,
519
- impl_or_trait_items : RefCell :: new ( DefIdMap ( ) ) ,
520
+ impl_or_trait_items : RefCell :: new ( DepTrackingMap :: new ( dep_graph . clone ( ) ) ) ,
520
521
trait_item_def_ids : RefCell :: new ( DefIdMap ( ) ) ,
521
522
trait_items_cache : RefCell :: new ( DefIdMap ( ) ) ,
522
523
ty_param_defs : RefCell :: new ( NodeMap ( ) ) ,
0 commit comments