@@ -44,6 +44,7 @@ use rustc_ast::{
4444} ;
4545use rustc_data_structures:: fx:: { FxHashMap , FxHashSet , FxIndexMap , FxIndexSet } ;
4646use rustc_data_structures:: intern:: Interned ;
47+ use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
4748use rustc_data_structures:: steal:: Steal ;
4849use rustc_data_structures:: sync:: FreezeReadGuard ;
4950use rustc_data_structures:: unord:: { UnordMap , UnordSet } ;
@@ -1644,6 +1645,13 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
16441645 }
16451646
16461647 pub fn into_outputs ( self ) -> ResolverOutputs {
1648+ let visibilities_hash = {
1649+ let mut hasher = StableHasher :: new ( ) ;
1650+ let mut hcx = self . create_stable_hashing_context ( ) ;
1651+ self . visibilities_for_hashing . hash_stable ( & mut hcx, & mut hasher) ;
1652+ hasher. finish ( )
1653+ } ;
1654+
16471655 let proc_macros = self . proc_macros ;
16481656 let expn_that_defined = self . expn_that_defined ;
16491657 let extern_crate_map = self . extern_crate_map ;
@@ -1665,7 +1673,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
16651673
16661674 let global_ctxt = ResolverGlobalCtxt {
16671675 expn_that_defined,
1668- visibilities_for_hashing : self . visibilities_for_hashing ,
1676+ visibilities_hash ,
16691677 effective_visibilities,
16701678 extern_crate_map,
16711679 module_children : self . module_children ,
0 commit comments