Parse argument names and types from a local functionβs HIR body.
Recursively unwrap Ref/Paren patterns to find the inner binding identifier.
Needed because &self / &mut self produce PatKind::Ref(PatKind::Binding(β¦)).
Return the resolved self type for a method whose DefId points to an
associated item that lives inside an impl block returning an ADT, or for
a struct/enum DefId directly (needed for parsing struct-invariant annotations).
Extract parameter names from a HIR trait method declaration and pair them
with types from the function signature. Handles TraitFn::Required (names
directly in the declaration) and TraitFn::Provided (names in the body).