[−][src]Function rustc_typeck::check::primary_body_of

pub(in check) fn primary_body_of(
    tcx: TyCtxt<'_>,
    id: HirId
) -> Option<(BodyId, Option<&Ty<'_>>, Option<&FnHeader>, Option<&FnDecl<'_>>)>

If this DefId is a "primary tables entry", returns Some((body_id, header, decl)) with information about it's body-id, fn-header and fn-decl (if any). 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.