Function rustc_typeck::check::primary_body_of
source · [−]fn primary_body_of(
tcx: TyCtxt<'_>,
id: HirId
) -> 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.