Rollup merge of #61836 - ljedrz:i_still_hate_node_ids, r=ljedrz

Replace some uses of NodeId with HirId

We are still using `NodeId` in some spots where we could use `HirId` instead; this PR targets some of these spots and removes some of the associated `hir::map` functions.
This commit is contained in:
Mazdak Farrokhzad 2019-06-17 20:55:57 +02:00 committed by GitHub
commit 0800b6ee20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
76 changed files with 270 additions and 378 deletions

View file

@ -45,7 +45,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingWhitelistedAttrPass {
let item = match cx.tcx.hir().get_by_hir_id(id) {
Node::Item(item) => item,
_ => cx.tcx.hir().expect_item_by_hir_id(cx.tcx.hir().get_parent_item(id)),
_ => cx.tcx.hir().expect_item(cx.tcx.hir().get_parent_item(id)),
};
if !attr::contains_name(&item.attrs, Symbol::intern("whitelisted_attr")) {