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:
commit
0800b6ee20
76 changed files with 270 additions and 378 deletions
|
|
@ -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")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue