@@ -43,6 +43,7 @@ use rustc_ast::{
4343} ;
4444use rustc_data_structures:: fx:: { FxHashMap , FxHashSet , FxIndexMap , FxIndexSet } ;
4545use rustc_data_structures:: intern:: Interned ;
46+ use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
4647use rustc_data_structures:: steal:: Steal ;
4748use rustc_data_structures:: sync:: { FreezeReadGuard , FreezeWriteGuard } ;
4849use rustc_data_structures:: unord:: { UnordMap , UnordSet } ;
@@ -1701,6 +1702,13 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
17011702 }
17021703
17031704 pub fn into_outputs ( self ) -> ResolverOutputs {
1705+ let visibilities_hash = {
1706+ let mut hasher = StableHasher :: new ( ) ;
1707+ let mut hcx = self . create_stable_hashing_context ( ) ;
1708+ self . visibilities_for_hashing . hash_stable ( & mut hcx, & mut hasher) ;
1709+ hasher. finish ( )
1710+ } ;
1711+
17041712 let proc_macros = self . proc_macros ;
17051713 let expn_that_defined = self . expn_that_defined ;
17061714 let extern_crate_map = self . extern_crate_map ;
@@ -1722,7 +1730,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
17221730
17231731 let global_ctxt = ResolverGlobalCtxt {
17241732 expn_that_defined,
1725- visibilities_for_hashing : self . visibilities_for_hashing ,
1733+ visibilities_hash ,
17261734 effective_visibilities,
17271735 extern_crate_map,
17281736 module_children : self . module_children ,
0 commit comments