Function rustc_hir_typeck::primary_body_of
source · pub(crate) fn primary_body_of(
node: Node<'_>
) -> Option<(BodyId, Option<&Ty<'_>>, Option<&FnSig<'_>>)>Expand description
If this DefId is a “primary tables entry”, returns
Some((body_id, body_ty, fn_sig)). Otherwise, returns None.
If this function returns Some, then typeck_results(def_id) will
succeed; if it returns None, then typeck_results(def_id) may or
may not succeed. In some cases where this function returns None
(notably closures), typeck_results(def_id) would wind up
redirecting to the owning function.