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_expr_has_ty

judgment_fn! {
    /// Prove that any loans issued in this value expression are respected, and return its type.
    fn borrow_check_expr_has_ty(
        env: TypeckEnv,
        assumptions: Predicates,
        state: FlowState,
        expr: Expr,
        ty: Ty,
        places_live_on_exit: LivePlaces,
    ) => FlowState {
        /* rules omitted */
    }
}

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

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.

block
LineCoverageSource
36336(borrow_check_expr(env, assumptions, state, expr, places_live_on_exit) => (ty_expr, state))
3647(prove_assignable(env, assumptions, state, ty_expr, ty) => state)
──────── ("block")
366118(borrow_check_expr_has_ty(env, assumptions, state, expr, ty, places_live_on_exit) => state)

How to read this page