Rollup merge of #109704 - petrochenkov:effvisclean, r=jackh726
resolve: Minor improvements to effective visibilities See individual commits.
This commit is contained in:
commit
fbe738345c
5 changed files with 71 additions and 65 deletions
|
@ -6,7 +6,7 @@ use rustc_data_structures::fx::FxHashMap;
|
|||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_macros::HashStable;
|
||||
use rustc_query_system::ich::StableHashingContext;
|
||||
use rustc_span::def_id::LocalDefId;
|
||||
use rustc_span::def_id::{LocalDefId, CRATE_DEF_ID};
|
||||
use std::hash::Hash;
|
||||
|
||||
/// Represents the levels of effective visibility an item can have.
|
||||
|
@ -107,6 +107,10 @@ impl EffectiveVisibilities {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn update_root(&mut self) {
|
||||
self.map.insert(CRATE_DEF_ID, EffectiveVisibility::from_vis(Visibility::Public));
|
||||
}
|
||||
|
||||
// FIXME: Share code with `fn update`.
|
||||
pub fn update_eff_vis(
|
||||
&mut self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue