rustc_hir_typeck::check

Function check_fn

Source
pub(crate) fn check_fn<'a, 'tcx>(
    fcx: &mut FnCtxt<'a, 'tcx>,
    fn_sig: FnSig<'tcx>,
    coroutine_types: Option<CoroutineTypes<'tcx>>,
    decl: &'tcx FnDecl<'tcx>,
    fn_def_id: LocalDefId,
    body: &'tcx Body<'tcx>,
    params_can_be_unsized: bool,
) -> Option<CoroutineTypes<'tcx>>
Expand description

Helper used for fns and closures. Does the grungy work of checking a function body and returns the function context used for that purpose, since in the case of a fn item there is still a bit more to do.

  • inherited: other fields inherited from the enclosing fn (if any)