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

fn primary_body_of<'a, 'tcx>(
    tcx: TyCtxt<'a, 'tcx, 'tcx>,
    id: NodeId
) -> Option<(BodyId, Option<&'tcx FnDecl>)>
🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

If this def-id is a "primary tables entry", returns Some((body_id, decl)) with information about it's body-id and fn-decl (if any). Otherwise, returns None.

If this function returns "some", then typeck_tables(def_id) will succeed; if it returns None, then typeck_tables(def_id) may or may not succeed. In some cases where this function returns None (notably closures), typeck_tables(def_id) would wind up redirecting to the owning function.