get_parent and find_parent

This commit is contained in:
Michael Goulet
2023-01-03 17:30:35 +00:00
parent 6af339dbfa
commit b1b19bd851
29 changed files with 88 additions and 95 deletions

View File

@@ -457,7 +457,7 @@ impl<'tcx> TyCtxt<'tcx> {
.def_id
.as_local()
.map(|id| hir.local_def_id_to_hir_id(id))
.and_then(|id| self.hir().find(self.hir().parent_id(id)))
.and_then(|id| self.hir().find_parent(id))
.as_ref()
.and_then(|node| node.generics())
{