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

Test foo

Source location: tests/borrowck.rs:4010

fn foo() -> u32 {
    exists<'r0, 'r1, 'r2> {
        let x: u32 = 22_u32;
        let p: &'r1 u32 = &'r0 x;
        let q: &'r2 u32 = p;
        x = 1_u32;
        q;
        return 0_u32;
    }
}

Rules proved (0)

This test records no positive coverage.

Premises failed (24)

The last column links to the premise’s page when the judgment view counts this failure against that premise. It does not when the premise is read as infallible, or when the failure was blamed inside a multi-line premise that carries no record on its own first line.

JudgmentRulePremiseAll tests of this premise
borrow_checkborrow_checkborrow_check_block(env, assumptions, state, bloc… (line 135)113 tests
borrow_check_blockbasic blockfor_all(i in 0..stmts.len()) with(env, state) (b… (line 158, blamed at line 159)not counted by the judgment view
borrow_check_statementexprborrow_check_expr( env, assumptions, state, expr… (line 234)41 tests
borrow_check_statementexistsscope(env.enter_existentially(&with_variables(bi… (line 304, blamed at line 306)not counted by the judgment view
borrow_check_statementexistsscope(env.enter_existentially(&with_variables(bi… (line 314, blamed at line 316)not counted by the judgment view
borrow_check_statementexistsscope(env.enter_existentially(&with_variables(bi… (line 328, blamed at line 331)not counted by the judgment view
borrow_check_exprassignaccess_permitted( env, assumptions, state, Acces… (line 455)16 tests
access_permittedaccess_permittedaccess_permitted_by_loans(env, assumptions, stat… (line 916)37 tests
access_permitted_by_loansaccess_permitted_by_loansfor_all(loan in &state.current.loans_live) with(… (line 935, blamed at line 936)not counted by the judgment view
access_permitted_by_loanborrow of disjoint placesif place_disjoint_from_place(&loan.place, &acces… (line 958)45 tests
access_permitted_by_loanwrite-indirectif let TypedPlaceExpressionData::Deref(place_loa… (line 985)37 tests
access_permitted_by_loanloan is deadloan_not_required_by_live_places(env, assumption… (line 1005)41 tests
loan_not_required_by_live_placesloan_not_required_by_live_placesfor_all(live_place in places_live_after_access) … (line 1379, blamed at line 1381)not counted by the judgment view
loan_not_required_by_live_placeloan is not required by typeloan_not_required_by_parameter(env, assumptions,… (line 1408)41 tests
loan_not_required_by_parameterrigid-tyloan_not_required_by_parameters(env, assumptions… (line 1476)41 tests
loan_not_required_by_parameterlifetimeloan_cannot_outlive(env, assumptions, outlives, … (line 1566)41 tests
loan_cannot_outliveloan_cannot_outliveif !outlived_by_loan.contains(&lifetime.upcast()… (line 1586)41 tests
loan_not_required_by_parametersloan_not_required_by_parametersfor_all(param in live_parameters) (loan_not_requ… (line 1613, blamed at line 1614)not counted by the judgment view
check_free_fncheck free fncheck_fn(program, Env::default(), Predicates::t(… (line 24)116 tests
check_fncheck fnscope(enter_universally(env, &f.binder) => (env,… (line 48, blamed at line 54)not counted by the judgment view
check_fn_bodyexpr fn bodyborrow_check(typeck_env, assumptions, initial_st… (line 89)114 tests
check_all_cratescheck all prefixesfor_all(i in 0..crates.len()) (let program = cra… (line 52, blamed at line 54)not counted by the judgment view
check_cratecheck cratefor_all(item in &c.items) (check_crate_item(prog… (line 74, blamed at line 75)not counted by the judgment view
check_crate_itemfree fncheck_free_fn(program, f, crate_id) => () (line 208)116 tests

Proof trees

Failed proof tree

How to read this page