@@ -388,7 +388,7 @@ pub struct TypeckTables<'tcx> {
388
388
389
389
/// Set of trait imports actually used in the method resolution.
390
390
/// This is used for warning unused imports.
391
- pub used_trait_imports : DefIdSet ,
391
+ pub used_trait_imports : Rc < RefCell < DefIdSet > > ,
392
392
393
393
/// If any errors occurred while type-checking this body,
394
394
/// this field will be set to `true`.
@@ -418,7 +418,7 @@ impl<'tcx> TypeckTables<'tcx> {
418
418
liberated_fn_sigs : ItemLocalMap ( ) ,
419
419
fru_field_types : ItemLocalMap ( ) ,
420
420
cast_kinds : ItemLocalMap ( ) ,
421
- used_trait_imports : DefIdSet ( ) ,
421
+ used_trait_imports : Rc :: new ( RefCell :: new ( DefIdSet ( ) ) ) ,
422
422
tainted_by_errors : false ,
423
423
free_region_map : FreeRegionMap :: new ( ) ,
424
424
}
@@ -782,7 +782,7 @@ impl<'gcx> HashStable<StableHashingContext<'gcx>> for TypeckTables<'gcx> {
782
782
cast_kinds. hash_stable ( hcx, hasher) ;
783
783
generator_sigs. hash_stable ( hcx, hasher) ;
784
784
generator_interiors. hash_stable ( hcx, hasher) ;
785
- used_trait_imports. hash_stable ( hcx, hasher) ;
785
+ used_trait_imports. borrow_mut ( ) . hash_stable ( hcx, hasher) ;
786
786
tainted_by_errors. hash_stable ( hcx, hasher) ;
787
787
free_region_map. hash_stable ( hcx, hasher) ;
788
788
} )
0 commit comments