1
Fork 0

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

@ -1108,7 +1108,7 @@ fn fn_sig(tcx: TyCtxt<'_>, def_id: DefId) -> ty::PolyFnSig<'_> {
ImplItem(hir::ImplItem { kind: ImplItemKind::Fn(sig, _), generics, .. }) => {
// Do not try to infer the return type for a impl method coming from a trait
if let Item(hir::Item { kind: ItemKind::Impl(i), .. }) =
tcx.hir().get(tcx.hir().parent_id(hir_id))
tcx.hir().get_parent(hir_id)
&& i.of_trait.is_some()
{
<dyn AstConv<'_>>::ty_of_fn(