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
|
@ -234,7 +234,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
|||
}
|
||||
match fn_return.kind {
|
||||
TyKind::OpaqueDef(item_id, _) => {
|
||||
let item = tcx.hir().item(item_id.id);
|
||||
let item = tcx.hir().item(item_id);
|
||||
let opaque = if let ItemKind::OpaqueTy(opaque) = &item.kind {
|
||||
opaque
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue