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_statement / continue / premise drop_places(env, assumptions, state, locals_to_drop, places_live_on_continue) => state

Premise at line 270. Observed failure causes: failed_judgment.

continue
LineCoverageSource
267(if state.scope_has_label(label))
2681(if let Some(places_live_on_continue) = state.live_after_continue(label))
269N/A(let locals_to_drop = state.locals_dropped_to_label(label))
2701(drop_places(env, assumptions, state, locals_to_drop, places_live_on_continue) => state)
271N/A(let state = state.with_continue(label))
272N/A(let state = state.diverges())
──────── ("continue")
2743(borrow_check_statement(env, assumptions, state, Stmt::Continue { label }, places_live_on_exit) => (env, state))

1 test failed proving this premise:


Source location: tests/borrowck.rs:2430

fn foo() -> i32 {
    exists<'r0, 'r1> {
        let r: &'r0 i32;
        'a: loop {
            let y: i32 = 0 _ i32;
            r = &'r1 y;
            continue 'a;
        }
        r; // only an error because of false edges, assumption that all loops terminate
    }
}
Failed proof tree