Test foo
Source location: tests/borrowck.rs:2385
fn foo() -> i32 {
exists<'r0, 'r1> {
let v1: i32 = 0_i32;
let v2: &'r0 i32 = &'r1 v1;
v1 = 1_i32;
return *v2;
}
}
Rules proved (0)
This test records no positive coverage.
Premises failed (25)
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.
| Judgment | Rule | Premise | All tests of this premise |
|---|---|---|---|
| borrow_check | borrow_check | borrow_check_block(env, assumptions, state, bloc… (line 135) | 113 tests |
| borrow_check_block | basic block | for_all(i in 0..stmts.len()) with(env, state) (b… (line 158, blamed at line 159) | not counted by the judgment view |
| borrow_check_statement | expr | borrow_check_expr( env, assumptions, state, expr… (line 234) | 41 tests |
| borrow_check_statement | exists | scope(env.enter_existentially(&with_variables(bi… (line 304, blamed at line 306) | not counted by the judgment view |
| borrow_check_statement | exists | scope(env.enter_existentially(&with_variables(bi… (line 314, blamed at line 316) | not counted by the judgment view |
| borrow_check_statement | exists | scope(env.enter_existentially(&with_variables(bi… (line 328, blamed at line 331) | not counted by the judgment view |
| borrow_check_expr | assign | access_permitted( env, assumptions, state, Acces… (line 455) | 16 tests |
| access_permitted | access_permitted | access_permitted_by_loans(env, assumptions, stat… (line 916) | 37 tests |
| access_permitted_by_loans | access_permitted_by_loans | for_all(loan in &state.current.loans_live) with(… (line 935, blamed at line 936) | not counted by the judgment view |
| access_permitted_by_loan | borrow of disjoint places | if place_disjoint_from_place(&loan.place, &acces… (line 958) | 45 tests |
| access_permitted_by_loan | write-indirect | if let TypedPlaceExpressionData::Deref(place_loa… (line 985) | 37 tests |
| access_permitted_by_loan | loan is dead | loan_not_required_by_live_places(env, assumption… (line 1005) | 41 tests |
| loan_not_required_by_live_places | loan_not_required_by_live_places | for_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_place | loan is not required by type | loan_not_required_by_parameter(env, assumptions,… (line 1408) | 41 tests |
| loan_not_required_by_parameter | rigid-ty | loan_not_required_by_parameters(env, assumptions… (line 1476) | 41 tests |
| loan_not_required_by_parameter | alias-ty RFC 1214 | loan_not_required_by_parameters(env, assumptions… (line 1492) | 27 tests |
| loan_not_required_by_parameter | lifetime | loan_cannot_outlive(env, assumptions, outlives, … (line 1566) | 41 tests |
| loan_cannot_outlive | loan_cannot_outlive | if !outlived_by_loan.contains(&lifetime.upcast()… (line 1586) | 41 tests |
| loan_not_required_by_parameters | loan_not_required_by_parameters | for_all(param in live_parameters) (loan_not_requ… (line 1613, blamed at line 1614) | not counted by the judgment view |
| check_free_fn | check free fn | check_fn(program, Env::default(), Predicates::t(… (line 24) | 116 tests |
| check_fn | check fn | scope(enter_universally(env, &f.binder) => (env,… (line 48, blamed at line 54) | not counted by the judgment view |
| check_fn_body | expr fn body | borrow_check(typeck_env, assumptions, initial_st… (line 89) | 114 tests |
| check_all_crates | check all prefixes | for_all(i in 0..crates.len()) (let program = cra… (line 52, blamed at line 54) | not counted by the judgment view |
| check_crate | check crate | for_all(item in &c.items) (check_crate_item(prog… (line 74, blamed at line 75) | not counted by the judgment view |
| check_crate_item | free fn | check_free_fn(program, f, crate_id) => () (line 208) | 116 tests |
Proof trees
Failed proof tree
check_all_crates failedmod.rs:42args
rule "check all prefixes"mod.rs:54check_crate failedmod.rs:61args
rule "check crate"mod.rs:75check_crate_item failedmod.rs:180rule "free fn"mod.rs:208check_free_fn failedfns.rs:14args
rule "check free fn"fns.rs:24check_fn failedfns.rs:31args
rule "check fn"fns.rs:54check_fn_body failedfns.rs:61args
rule "expr fn body"fns.rs:89borrow_check failednll.rs:124args
rule "borrow_check"nll.rs:135borrow_check_block failednll.rs:144rule "basic block"nll.rs:159borrow_check_statement failednll.rs:176args
rule "exists"nll.rs:306borrow_check_block failednll.rs:144args
rule "basic block"nll.rs:159borrow_check_statement failednll.rs:176args
rule "expr"nll.rs:234borrow_check_expr failednll.rs:375args
rule "assign"nll.rs:455access_permitted failednll.rs:900args
rule "access_permitted"nll.rs:916access_permitted_by_loans failednll.rs:923rule "access_permitted_by_loans"nll.rs:936access_permitted_by_loan failednll.rs:943args
rule "borrow of disjoint places"nll.rs:958 (failed: if_false)rule "loan is dead"nll.rs:1005loan_not_required_by_live_places failednll.rs:1356args
rule "loan_not_required_by_live_places"nll.rs:1381loan_not_required_by_live_place failednll.rs:1388args
rule "loan is not required by type"nll.rs:1408loan_not_required_by_parameter failednll.rs:1456args
rule "alias-ty RFC 1214"nll.rs:1492loan_not_required_by_parameters failednll.rs:1593args
rule "loan_not_required_by_parameters"nll.rs:1614loan_not_required_by_parameter failednll.rs:1456args
rule "rigid-ty"nll.rs:1476loan_not_required_by_parameters failednll.rs:1593args
rule "loan_not_required_by_parameters"nll.rs:1614loan_not_required_by_parameter failednll.rs:1456args
rule "lifetime"nll.rs:1566loan_cannot_outlive failednll.rs:1573args
rule "loan_cannot_outlive"nll.rs:1586 (failed: if_false)
rule "write-indirect"nll.rs:985 (failed: if_let)