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
|
@ -1382,7 +1382,7 @@ impl<'tcx> Visitor<'tcx> for DumpVisitor<'tcx> {
|
|||
});
|
||||
}
|
||||
hir::TyKind::OpaqueDef(item_id, _) => {
|
||||
let item = self.tcx.hir().item(item_id.id);
|
||||
let item = self.tcx.hir().item(item_id);
|
||||
self.nest_typeck_results(self.tcx.hir().local_def_id(item_id.id), |v| {
|
||||
v.visit_item(item)
|
||||
});
|
||||
|
|
|
@ -317,7 +317,7 @@ impl<'hir> Sig for hir::Ty<'hir> {
|
|||
Ok(replace_text(nested_ty, text))
|
||||
}
|
||||
hir::TyKind::OpaqueDef(item_id, _) => {
|
||||
let item = scx.tcx.hir().item(item_id.id);
|
||||
let item = scx.tcx.hir().item(item_id);
|
||||
item.make(offset, Some(item_id.id), scx)
|
||||
}
|
||||
hir::TyKind::Typeof(_) | hir::TyKind::Infer | hir::TyKind::Err => Err("Ty"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue