1
Fork 0

rename get_parent_node to parent_id

This commit is contained in:
Michael Goulet 2023-01-03 07:31:04 +00:00
parent c7572670a1
commit a313ef05a7
48 changed files with 119 additions and 121 deletions

View file

@ -212,7 +212,7 @@ pub(crate) fn placeholder_type_error_diag<'tcx>(
is_fn = true;
// Check if parent is const or static
let parent_id = tcx.hir().get_parent_node(hir_ty.hir_id);
let parent_id = tcx.hir().parent_id(hir_ty.hir_id);
let parent_node = tcx.hir().get(parent_id);
is_const_or_static = matches!(
@ -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().get_parent_node(hir_id))
tcx.hir().get(tcx.hir().parent_id(hir_id))
&& i.of_trait.is_some()
{
<dyn AstConv<'_>>::ty_of_fn(