@@ -1034,7 +1034,7 @@ pub struct Resolver<'a> {
1034
1034
1035
1035
main_def : Option < MainDefinition > ,
1036
1036
1037
- node_privacy : FxHashMap < HirId , AccessLevel > ,
1037
+ nodes_access_level : FxHashMap < LocalDefId , AccessLevel > ,
1038
1038
}
1039
1039
1040
1040
/// Nothing really interesting here; it just provides memory for the rest of the crate.
@@ -1397,7 +1397,7 @@ impl<'a> Resolver<'a> {
1397
1397
legacy_const_generic_args : Default :: default ( ) ,
1398
1398
main_def : Default :: default ( ) ,
1399
1399
1400
- node_privacy : Default :: default ( ) ,
1400
+ nodes_access_level : Default :: default ( ) ,
1401
1401
} ;
1402
1402
1403
1403
let root_parent_scope = ParentScope :: module ( graph_root, & resolver) ;
@@ -1440,7 +1440,7 @@ impl<'a> Resolver<'a> {
1440
1440
let maybe_unused_extern_crates = self . maybe_unused_extern_crates ;
1441
1441
let glob_map = self . glob_map ;
1442
1442
let main_def = self . main_def ;
1443
- let access_levels = self . node_privacy ;
1443
+ let access_levels = self . nodes_access_level ;
1444
1444
ResolverOutputs {
1445
1445
definitions,
1446
1446
cstore : Box :: new ( self . crate_loader . into_cstore ( ) ) ,
@@ -1463,7 +1463,7 @@ impl<'a> Resolver<'a> {
1463
1463
pub fn clone_outputs ( & self ) -> ResolverOutputs {
1464
1464
ResolverOutputs {
1465
1465
definitions : self . definitions . clone ( ) ,
1466
- access_levels : self . node_privacy . clone ( ) ,
1466
+ access_levels : self . nodes_access_level . clone ( ) ,
1467
1467
cstore : Box :: new ( self . cstore ( ) . clone ( ) ) ,
1468
1468
visibilities : self . visibilities . clone ( ) ,
1469
1469
extern_crate_map : self . extern_crate_map . clone ( ) ,
@@ -1549,7 +1549,7 @@ impl<'a> Resolver<'a> {
1549
1549
}
1550
1550
}
1551
1551
1552
- tracing:: info!( "node_privacy : {:#?}" , self . node_privacy ) ;
1552
+ tracing:: info!( "nodes_access_level : {:#?}" , self . nodes_access_level ) ;
1553
1553
}
1554
1554
1555
1555
fn recursive_define_access_level (
@@ -1584,10 +1584,8 @@ impl<'a> Resolver<'a> {
1584
1584
}
1585
1585
1586
1586
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 ( )
1591
1589
} else {
1592
1590
false
1593
1591
}
0 commit comments