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

Negative coverage: borrow_check_expr / assign / premise prove_assignable(env, assumptions, state, value_ty, &place.ty) => state

Premise at line 370. Observed failure causes: failed_judgment.

assign
LineCoverageSource
353(borrow_check_expr(
env,
assumptions,
state,
expr,
Assignment(place).live_before(env, &state, places_live_on_exit),
) => (value_ty, state))
3622(borrow_check_place_expr(
env,
assumptions,
state,
place,
) => (place, state))
3701(prove_assignable(env, assumptions, state, value_ty, &place.ty) => state)
3728(access_permitted(
env,
assumptions,
state,
Access::new(AccessKind::Write, place),
places_live_on_exit,
) => state)
380N/A(let state = kill_loans(place, state))
381N/A(let state = state.with_initialized(&place.to_place_expression()))
──────── ("assign")
38313(borrow_check_expr(env, assumptions, state, Expr::Assign { place, expr }, places_live_on_exit) => (Ty::unit(), state))

1 test failed proving this premise:


Source location: tests/borrowck.rs:2192

fn foo<'a, 'b>(v1: &'a u32, v2: &'b u32) -> () {
    let output: &'b u32 = v2;
    loop {
        output = v1;
    }
}
Failed proof tree