Use ItemId as a strongly typed index.
This commit is contained in:
parent
ac8961fc04
commit
c676e358a5
28 changed files with 63 additions and 51 deletions
|
@ -588,8 +588,8 @@ impl EmbargoVisitor<'tcx> {
|
|||
.map(|module_hir_id| self.tcx.hir().expect_item(module_hir_id))
|
||||
{
|
||||
if let hir::ItemKind::Mod(m) = &item.kind {
|
||||
for item_id in m.item_ids {
|
||||
let item = self.tcx.hir().expect_item(item_id.id);
|
||||
for &item_id in m.item_ids {
|
||||
let item = self.tcx.hir().item(item_id);
|
||||
let def_id = self.tcx.hir().local_def_id(item_id.id);
|
||||
if !self.tcx.hygienic_eq(segment.ident, item.ident, def_id.to_def_id()) {
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue