@@ -43,6 +43,7 @@ use rustc_ast::{
43
43
} ;
44
44
use rustc_data_structures:: fx:: { FxHashMap , FxHashSet , FxIndexMap , FxIndexSet } ;
45
45
use rustc_data_structures:: intern:: Interned ;
46
+ use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
46
47
use rustc_data_structures:: steal:: Steal ;
47
48
use rustc_data_structures:: sync:: { FreezeReadGuard , FreezeWriteGuard } ;
48
49
use rustc_data_structures:: unord:: { UnordMap , UnordSet } ;
@@ -1701,6 +1702,13 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
1701
1702
}
1702
1703
1703
1704
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
+
1704
1712
let proc_macros = self . proc_macros ;
1705
1713
let expn_that_defined = self . expn_that_defined ;
1706
1714
let extern_crate_map = self . extern_crate_map ;
@@ -1722,7 +1730,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
1722
1730
1723
1731
let global_ctxt = ResolverGlobalCtxt {
1724
1732
expn_that_defined,
1725
- visibilities_for_hashing : self . visibilities_for_hashing ,
1733
+ visibilities_hash ,
1726
1734
effective_visibilities,
1727
1735
extern_crate_map,
1728
1736
module_children : self . module_children ,
0 commit comments