HirIdification: change some NodeId to HirId calls
This commit is contained in:
parent
36fffa8196
commit
f5bba2c6d7
5 changed files with 22 additions and 23 deletions
|
|
@ -296,8 +296,8 @@ pub fn build_impl(cx: &DocContext, did: DefId, ret: &mut Vec<clean::Item>) {
|
|||
}
|
||||
}
|
||||
|
||||
let for_ = if let Some(nodeid) = tcx.hir().as_local_node_id(did) {
|
||||
match tcx.hir().expect_item(nodeid).node {
|
||||
let for_ = if let Some(hir_id) = tcx.hir().as_local_hir_id(did) {
|
||||
match tcx.hir().expect_item_by_hir_id(hir_id).node {
|
||||
hir::ItemKind::Impl(.., ref t, _) => {
|
||||
t.clean(cx)
|
||||
}
|
||||
|
|
@ -318,8 +318,8 @@ pub fn build_impl(cx: &DocContext, did: DefId, ret: &mut Vec<clean::Item>) {
|
|||
}
|
||||
|
||||
let predicates = tcx.predicates_of(did);
|
||||
let (trait_items, generics) = if let Some(nodeid) = tcx.hir().as_local_node_id(did) {
|
||||
match tcx.hir().expect_item(nodeid).node {
|
||||
let (trait_items, generics) = if let Some(hir_id) = tcx.hir().as_local_hir_id(did) {
|
||||
match tcx.hir().expect_item_by_hir_id(hir_id).node {
|
||||
hir::ItemKind::Impl(.., ref gen, _, _, ref item_ids) => {
|
||||
(
|
||||
item_ids.iter()
|
||||
|
|
|
|||
|
|
@ -2562,9 +2562,9 @@ impl Clean<Type> for hir::Ty {
|
|||
let mut alias = None;
|
||||
if let Def::TyAlias(def_id) = path.def {
|
||||
// Substitute private type aliases
|
||||
if let Some(node_id) = cx.tcx.hir().as_local_node_id(def_id) {
|
||||
if let Some(hir_id) = cx.tcx.hir().as_local_hir_id(def_id) {
|
||||
if !cx.renderinfo.borrow().access_levels.is_exported(def_id) {
|
||||
alias = Some(&cx.tcx.hir().expect_item(node_id).node);
|
||||
alias = Some(&cx.tcx.hir().expect_item_by_hir_id(hir_id).node);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue