Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Judgment check_fn_body

judgment_fn! {
    /// Check the function body, dispatching to the borrow checker for expression bodies.
    fn check_fn_body(
        program: Program,
        env: Env,
        assumptions: Predicates,
        body: MaybeFnBody,
        input_args: Vec<crate::grammar::InputArg>,
        output_ty: crate::grammar::Ty,
    ) => () {
        /* rules omitted */
    }
}

Source: crates/formality-rust/src/check/fns.rs:61

The number on each rule’s conclusion is positive coverage; the number on each premise is negative coverage. Click a number to browse the tests.

no fn body
LineCoverageSource
──────── ("no fn body")
76192(check_fn_body(program, env, assumptions, MaybeFnBody::NoFnBody, input_args, output_ty) => ())
trusted fn body
LineCoverageSource
──────── ("trusted fn body")
8215(check_fn_body(program, env, assumptions, MaybeFnBody::FnBody(FnBody::TrustedFnBody), input_args, output_ty) => ())
expr fn body
LineCoverageSource
87N/A(let typeck_env = TypeckEnv::for_fn_body(env, program, output_ty))
88✗(let initial_state = FlowState::for_fn_body(env, input_args)?)
8979(borrow_check(typeck_env, assumptions, initial_state, block) => ())
──────── ("expr fn body")
91175(check_fn_body(program, env, assumptions, MaybeFnBody::FnBody(FnBody::Expr(block)), input_args, output_ty) => ())

How to read this page