@@ -1034,7 +1034,7 @@ pub struct Resolver<'a> {
10341034
10351035 main_def : Option < MainDefinition > ,
10361036
1037- node_privacy : FxHashMap < HirId , AccessLevel > ,
1037+ nodes_access_level : FxHashMap < LocalDefId , AccessLevel > ,
10381038}
10391039
10401040/// Nothing really interesting here; it just provides memory for the rest of the crate.
@@ -1397,7 +1397,7 @@ impl<'a> Resolver<'a> {
13971397 legacy_const_generic_args : Default :: default ( ) ,
13981398 main_def : Default :: default ( ) ,
13991399
1400- node_privacy : Default :: default ( ) ,
1400+ nodes_access_level : Default :: default ( ) ,
14011401 } ;
14021402
14031403 let root_parent_scope = ParentScope :: module ( graph_root, & resolver) ;
@@ -1440,7 +1440,7 @@ impl<'a> Resolver<'a> {
14401440 let maybe_unused_extern_crates = self . maybe_unused_extern_crates ;
14411441 let glob_map = self . glob_map ;
14421442 let main_def = self . main_def ;
1443- let access_levels = self . node_privacy ;
1443+ let access_levels = self . nodes_access_level ;
14441444 ResolverOutputs {
14451445 definitions,
14461446 cstore : Box :: new ( self . crate_loader . into_cstore ( ) ) ,
@@ -1463,7 +1463,7 @@ impl<'a> Resolver<'a> {
14631463 pub fn clone_outputs ( & self ) -> ResolverOutputs {
14641464 ResolverOutputs {
14651465 definitions : self . definitions . clone ( ) ,
1466- access_levels : self . node_privacy . clone ( ) ,
1466+ access_levels : self . nodes_access_level . clone ( ) ,
14671467 cstore : Box :: new ( self . cstore ( ) . clone ( ) ) ,
14681468 visibilities : self . visibilities . clone ( ) ,
14691469 extern_crate_map : self . extern_crate_map . clone ( ) ,
@@ -1549,7 +1549,7 @@ impl<'a> Resolver<'a> {
15491549 }
15501550 }
15511551
1552- tracing:: info!( "node_privacy : {:#?}" , self . node_privacy ) ;
1552+ tracing:: info!( "nodes_access_level : {:#?}" , self . nodes_access_level ) ;
15531553 }
15541554
15551555 fn recursive_define_access_level (
@@ -1584,10 +1584,8 @@ impl<'a> Resolver<'a> {
15841584 }
15851585
15861586 fn mark_node_with_access_level ( & mut self , node_id : NodeId , access_level : AccessLevel ) -> bool {
1587- if let Some ( local_def_id) = self . opt_local_def_id ( node_id) {
1588- if let Some ( hir_id) = self . definitions ( ) . def_id_to_hir_id . get ( local_def_id. to_def_id ( ) ) {
1589- self . node_privacy . insert ( hir_id, access_level) . is_none ( ) ;
1590- }
1587+ if let Some ( def_id) = self . opt_local_def_id ( node_id) {
1588+ self . nodes_access_level . insert ( def_id, access_level) . is_none ( )
15911589 } else {
15921590 false
15931591 }
0 commit comments