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:5149

fn foo() -> () {
    let x: u32 = 1_u32;
    exists<'a> {
        let r: &'a mut u32 = &'a mut x;
        x = x + *r;
    }
}

Rules proved (0)

This test records no positive coverage.

Premises failed (26)

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)79 tests
borrow_check_blockbasic blockfor_all(i in 0..stmts.len()) with(env, state) (b… (line 156, blamed at line 157)not counted by the judgment view
borrow_check_statementexprborrow_check_expr( env, assumptions, state, expr… (line 232)26 tests
borrow_check_statementexistsscope(env.enter_existentially(&with_variables(bi… (line 300, blamed at line 302)not counted by the judgment view
borrow_check_statementexistsscope(env.enter_existentially(&with_variables(bi… (line 310, blamed at line 312)not counted by the judgment view
borrow_check_statementexistsscope(env.enter_existentially(&with_variables(bi… (line 324, blamed at line 327)not counted by the judgment view
borrow_check_exprassignborrow_check_expr( env, assumptions, state, expr… (line 397)1 test
borrow_check_exprbinopborrow_check_expr(env, assumptions, state, lhs, … (line 485)1 test
borrow_check_exprplaceaccess_permitted(env, assumptions, state, Access… (line 547)17 tests
access_permittedaccess_permittedaccess_permitted_by_loans(env, assumptions, stat… (line 878)24 tests
access_permitted_by_loansaccess_permitted_by_loansfor_all(loan in &state.current.loans_live) with(… (line 897, blamed at line 898)not counted by the judgment view
access_permitted_by_loanborrow of disjoint placesif place_disjoint_from_place(&loan.place, &acces… (line 920)29 tests
access_permitted_by_loanloan is deadloan_not_required_by_live_places(env, assumption… (line 967)29 tests
loan_not_required_by_live_placesloan_not_required_by_live_placesfor_all(live_place in places_live_after_access) … (line 1319, blamed at line 1321)not counted by the judgment view
loan_not_required_by_live_placeloan is not required by typeloan_not_required_by_parameter(env, assumptions,… (line 1348)29 tests
loan_not_required_by_parameterrigid-tyloan_not_required_by_parameters(env, assumptions… (line 1416)29 tests
loan_not_required_by_parameteralias-ty RFC 1214loan_not_required_by_parameters(env, assumptions… (line 1432)18 tests
loan_not_required_by_parameterlifetimeloan_cannot_outlive(env, assumptions, outlives, … (line 1506)29 tests
loan_cannot_outliveloan_cannot_outliveif !outlived_by_loan.contains(&lifetime.upcast()… (line 1526)29 tests
loan_not_required_by_parametersloan_not_required_by_parametersfor_all(param in live_parameters) (loan_not_requ… (line 1553, blamed at line 1554)not counted by the judgment view
check_free_fncheck free fncheck_fn(program, Env::default(), Predicates::t(… (line 24)81 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)79 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 73, blamed at line 74)not counted by the judgment view
check_crate_itemfree fncheck_free_fn(program, f, crate_id) => () (line 207)81 tests

Proof trees

Failed proof tree

How to read this page