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| Line | Coverage | Source |
|---|---|---|
| 629 | 1 | (let Fn { binder, .. } = env.crates().fn_named(id)?) |
| 630 | 2 | (if binder.len() == args.len()) |
| 631 | ✗ | (let FnBoundData { where_clauses, .. } = binder.instantiate_with(args)?) |
| 632 | 5 | (prove_where_clauses(env, assumptions, state, where_clauses) => state) |
| 633 | N/A | (let ty = Ty::rigid(RigidName::fn_def(id), args)) |
| ──────── ("fn-ref") | ||
| 635 | 43 | (borrow_check_fn_ref(env, assumptions, state, id, args) => (ty, state)) |