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: access_permitted_by_loan / loan is dead / premise loan_cannot_outlive_universal_regions(env, assumptions, &state.current.outlives, &loan) => ()

Premise at line 1006. Observed failure causes: failed_judgment.

loan is dead
LineCoverageSource
1003✗(if !place_disjoint_from_place(&loan.place, &access.place))
1004N/A(let places_live = places_live_for_loan(env, access, places_live_after_access))
100541(loan_not_required_by_live_places(env, assumptions, state, loan, places_live) => state)
10064(loan_cannot_outlive_universal_regions(env, assumptions, &state.current.outlives, &loan) => ())
──────── ("loan is dead")
100843(access_permitted_by_loan(env, assumptions, state, loan, access, places_live_after_access) => state)

4 tests failed proving this premise:


Source location: tests/borrowck.rs:2681 (all coverage from this test)

fn dangling<'a>() -> &'a u32 {
    let x: u32 = 22_u32;
    exists<'r0> {
        return &'r0 x;
    }
}
Failed proof tree

Source location: tests/borrowck.rs:2726 (all coverage from this test)

fn dangling<'a>(x: u32) -> &'a u32 {
    exists<'r0> {
        return &'r0 x;
    }
}
Failed proof tree

Source location: tests/borrowck.rs:2782 (all coverage from this test)

fn store(x: u32) -> () {
    exists<'r0> {
        stash(&'r0 x);
    }
}
Failed proof tree

Source location: tests/mir_typeck.rs:2101 (all coverage from this test)

fn main() -> () {
    let v0: u32 = 0_u32;
    exists<'r> {
        let v1: &'r u32 = &'r v0;
        needs_all::<&'r u32>(v1);
        v0 = 1_u32;
    }
}
Failed proof tree

How to read this page