Fix circular fn_sig queries to return the correct number of arguments for methods

This commit is contained in:
Jesse Rusak
2024-09-17 20:53:37 -04:00
parent 28e8f01c2a
commit 3cb1f334b8
3 changed files with 35 additions and 1 deletions

View File

@@ -56,7 +56,7 @@ impl<'tcx> Value<TyCtxt<'tcx>> for ty::Binder<'_, ty::FnSig<'_>> {
&& let Some(node) = tcx.hir().get_if_local(def_id)
&& let Some(sig) = node.fn_sig()
{
sig.decl.inputs.len() + sig.decl.implicit_self.has_implicit_self() as usize
sig.decl.inputs.len()
} else {
tcx.dcx().abort_if_errors();
unreachable!()