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(β¦)).
The internal crate::module::β¦ path of a DefId (e.g. alloc::rcs::rc::Rc),
normalised from its def_path_str debug form. Used for display/debug and as
the fallback in public_def_path for items without a Ty.
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).
Match a short type name against std types resolved by name-scan (no
lang/diagnostic item), e.g. std::ascii::Char (AsciiChar) whose Char
short name otherwise collides with the primitive char.
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).
The canonical std JSON asset key for a DefId, prefixed by its defining
crate. Types resolve re-exports; inherent methods keep the module::method
shape, except that the private alloc::rcs module (Rust 1.96+) is mapped
back to the public rc/sync.