Use ItemId as a strongly typed index.

This commit is contained in:
Camille GILLOT
2021-01-30 12:06:04 +01:00
parent ac8961fc04
commit c676e358a5
28 changed files with 63 additions and 51 deletions

View File

@@ -329,7 +329,7 @@ impl<'tcx> Visitor<'tcx> for MarkSymbolVisitor<'tcx> {
fn visit_ty(&mut self, ty: &'tcx hir::Ty<'tcx>) {
if let TyKind::OpaqueDef(item_id, _) = ty.kind {
let item = self.tcx.hir().expect_item(item_id.id);
let item = self.tcx.hir().item(item_id);
intravisit::walk_item(self, item);
}
intravisit::walk_ty(self, ty);