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 / break / premise drop_places(env, assumptions, state, locals_to_drop, places_live_on_exit) => state

Premise at line 257. Observed failure causes: failed_judgment.

break
LineCoverageSource
255(if state.scope_has_label(label))
256N/A(let locals_to_drop = state.locals_dropped_to_label(label))
2572(drop_places(env, assumptions, state, locals_to_drop, places_live_on_exit) => state)
258N/A(let state = state.with_break(label))
259N/A(let state = state.diverges())
──────── ("break")
26111(borrow_check_statement(env, assumptions, state, Stmt::Break { label }, places_live_on_exit) => (env, state))

2 tests failed proving this premise:


Source location: tests/borrowck.rs:2111

fn foo() -> i32 {
    exists<'r0, 'r1> {
        let v2: &'r0 i32;
        'a: {
            let v1: i32 = 0 _ i32;
            v2 = &'r1 v1;
            break 'a;
        }
        return *v2;
    }
}
Failed proof tree

Source location: tests/borrowck.rs:2544

fn foo() -> i32 {
    exists<'r0, 'r1> {
        let r: &'r0 i32;
        'a: loop {
            let x: i32 = 0 _ i32;
            r = &'r1 x;
            break 'a;
        }
        return *r;
    }
}
Failed proof tree