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 borrow_check_fn_ref

judgment_fn! {
    /// Check a function reference and accumulate its instantiated where-clauses.
    /// Bare function names supply an empty list of generic arguments.
    fn borrow_check_fn_ref(
        env: TypeckEnv,
        assumptions: Predicates,
        state: FlowState,
        id: ValueId,
        args: Vec<Parameter>,
    ) => (Ty, FlowState) {
        /* rules omitted */
    }
}

Source: crates/formality-rust/src/check/borrow_check/nll.rs:616

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.

fn-ref
LineCoverageSource
6291(let Fn { binder, .. } = env.crates().fn_named(id)?)
6302(if binder.len() == args.len())
631✗(let FnBoundData { where_clauses, .. } = binder.instantiate_with(args)?)
6325(prove_where_clauses(env, assumptions, state, where_clauses) => state)
633N/A(let ty = Ty::rigid(RigidName::fn_def(id), args))
──────── ("fn-ref")
63543(borrow_check_fn_ref(env, assumptions, state, id, args) => (ty, state))

How to read this page