Auto merge of #59096 - ljedrz:HirIdify_AccessLevel, r=Zoxc
middle: replace NodeId with HirId in AccessLevels Pushing the limits of HirIdification (#57578). Replaces `NodeId` with `HirId` in `middle::privacy::AccessLevels`. Actually this time I was more successful and cracked it; I probably tried to HirIdify too much at once when I attempted it last time ^^. r? @Zoxc
This commit is contained in:
commit
0f118f6a6c
8 changed files with 57 additions and 54 deletions
|
|
@ -469,11 +469,11 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
|
|||
sess.abort_if_errors();
|
||||
|
||||
let access_levels = tcx.privacy_access_levels(LOCAL_CRATE);
|
||||
// Convert from a NodeId set to a DefId set since we don't always have easy access
|
||||
// to the map from defid -> nodeid
|
||||
// Convert from a HirId set to a DefId set since we don't always have easy access
|
||||
// to the map from defid -> hirid
|
||||
let access_levels = AccessLevels {
|
||||
map: access_levels.map.iter()
|
||||
.map(|(&k, &v)| (tcx.hir().local_def_id(k), v))
|
||||
.map(|(&k, &v)| (tcx.hir().local_def_id_from_hir_id(k), v))
|
||||
.collect()
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue