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 / block / premise borrow_check_block(env, assumptions, state, block, places_live_on_exit) => state

Premise at line 289. Observed failure causes: failed_judgment.

block
LineCoverageSource
2894(borrow_check_block(env, assumptions, state, block, places_live_on_exit) => state)
──────── ("block")
2916(borrow_check_statement(env, assumptions, state, Stmt::Block(block), places_live_on_exit) => (env, state))

4 tests failed proving this premise:


Source location: tests/borrowck.rs:1997

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

Source location: tests/borrowck.rs:2069

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

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/mir_typeck.rs:825

fn foo() -> u32 {
    'a: {
        continue 'a;
    }
    return 0 _ u32;
}
Failed proof tree