Test main
Source location: tests/mir_typeck.rs:2101
fn main() -> () {
let v0: u32 = 0_u32;
exists<'r> {
let v1: &'r u32 = &'r v0;
needs_all::<&'r u32>(v1);
v0 = 1_u32;
}
}
Rules proved (0)
This test records no positive coverage.
Premises failed (17)
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 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_cannot_outlive_universal_regions(env, assum… (line 1006) | 4 tests |
| loan_cannot_outlive_universal_regions | loan_not_required_by_universal_regions | if outlived_by_loan.iter().all(|p| match p { // … (line 1327) | 10 tests |
| 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:331borrow_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:1006loan_cannot_outlive_universal_regions failednll.rs:1300args
rule "loan_not_required_by_universal_regions"nll.rs:1327 (failed: if_false)
rule "write-indirect"nll.rs:985 (failed: if_let)
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:1006loan_cannot_outlive_universal_regions failednll.rs:1300args
rule "loan_not_required_by_universal_regions"nll.rs:1327 (failed: if_false)
rule "write-indirect"nll.rs:985 (failed: if_let)