@@ -44,6 +44,7 @@ use rustc_ast::{
44
44
} ;
45
45
use rustc_data_structures:: fx:: { FxHashMap , FxHashSet , FxIndexMap , FxIndexSet } ;
46
46
use rustc_data_structures:: intern:: Interned ;
47
+ use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
47
48
use rustc_data_structures:: steal:: Steal ;
48
49
use rustc_data_structures:: sync:: FreezeReadGuard ;
49
50
use rustc_data_structures:: unord:: { UnordMap , UnordSet } ;
@@ -1644,6 +1645,13 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
1644
1645
}
1645
1646
1646
1647
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
+
1647
1655
let proc_macros = self . proc_macros ;
1648
1656
let expn_that_defined = self . expn_that_defined ;
1649
1657
let extern_crate_map = self . extern_crate_map ;
@@ -1665,7 +1673,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
1665
1673
1666
1674
let global_ctxt = ResolverGlobalCtxt {
1667
1675
expn_that_defined,
1668
- visibilities_for_hashing : self . visibilities_for_hashing ,
1676
+ visibilities_hash ,
1669
1677
effective_visibilities,
1670
1678
extern_crate_map,
1671
1679
module_children : self . module_children ,
0 commit comments