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 access_kind_for_place_use

judgment_fn! {
    /// Determine whether evaluating a place reads from it or moves from it.
    /// Copy places behave like reads for loan checking everything else
    /// is treated as a move so overlapping live loans can reject it.
    fn access_kind_for_place_use(
        env: TypeckEnv,
        assumptions: Predicates,
        state: FlowState,
        place: TypedPlaceExpr,
    ) => (AccessKind, FlowState) {
        /* rules omitted */
    }
}

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

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.

copy
LineCoverageSource
1009✗(prove_ty_is_copy(env, assumptions, state, &place.ty) => state)
──────── ("copy")
10113(access_kind_for_place_use(_env, _assumptions, state, _place) => (AccessKind::Read, state))
move
LineCoverageSource
──────── ("move")
1016100(access_kind_for_place_use(_env, _assumptions, state, _place) => (AccessKind::Move, state))

How to read this page