@@ -388,7 +388,7 @@ pub struct TypeckTables<'tcx> {
388388
389389 /// Set of trait imports actually used in the method resolution.
390390 /// This is used for warning unused imports.
391- pub used_trait_imports : DefIdSet ,
391+ pub used_trait_imports : Rc < RefCell < DefIdSet > > ,
392392
393393 /// If any errors occurred while type-checking this body,
394394 /// this field will be set to `true`.
@@ -418,7 +418,7 @@ impl<'tcx> TypeckTables<'tcx> {
418418 liberated_fn_sigs : ItemLocalMap ( ) ,
419419 fru_field_types : ItemLocalMap ( ) ,
420420 cast_kinds : ItemLocalMap ( ) ,
421- used_trait_imports : DefIdSet ( ) ,
421+ used_trait_imports : Rc :: new ( RefCell :: new ( DefIdSet ( ) ) ) ,
422422 tainted_by_errors : false ,
423423 free_region_map : FreeRegionMap :: new ( ) ,
424424 }
@@ -782,7 +782,7 @@ impl<'gcx> HashStable<StableHashingContext<'gcx>> for TypeckTables<'gcx> {
782782 cast_kinds. hash_stable ( hcx, hasher) ;
783783 generator_sigs. hash_stable ( hcx, hasher) ;
784784 generator_interiors. hash_stable ( hcx, hasher) ;
785- used_trait_imports. hash_stable ( hcx, hasher) ;
785+ used_trait_imports. borrow_mut ( ) . hash_stable ( hcx, hasher) ;
786786 tainted_by_errors. hash_stable ( hcx, hasher) ;
787787 free_region_map. hash_stable ( hcx, hasher) ;
788788 } )
0 commit comments