Test foo
Source location: tests/borrowck.rs:310
fn foo() -> Datum {
let x: Datum = Datum { value: 0_u32 };
if true {
let y: Datum = x;
}
let z: Datum = x;
return z;
}
Rules proved (0)
This test records no positive coverage.
Premises failed (12)
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 138) | 60 tests |
| borrow_check_block | basic block | for_all(i in 0..stmts.len()) with(env, state) (b… (line 159, blamed at line 160) | not counted by the judgment view |
| borrow_check_statement | let | for_all(init in init.into_iter()) with (state) /… (line 192, blamed at line 194) | not counted by the judgment view |
| borrow_check_expr_has_ty | block | borrow_check_expr(env, assumptions, state, expr,… (line 364) | 28 tests |
| borrow_check_expr | place | access_permitted(env, assumptions, state, Access… (line 504) | 13 tests |
| access_permitted | access_permitted | if match access.kind { AccessKind::Write => chec… (line 809) | 12 tests |
| check_free_fn | check free fn | check_fn(program, Env::default(), Wcs::t(), f, c… (line 24) | 61 tests |
| check_fn | check fn | check_fn_body(program, env, assumptions, body, i… (line 55) | 60 tests |
| check_fn_body | expr fn body | borrow_check(typeck_env, assumptions, initial_st… (line 90) | 60 tests |
| check_all_crates | check all prefixes | for_all(i in 0..crates.len()) (let program = cra… (line 51, blamed at line 53) | not counted by the judgment view |
| check_crate | check crate | for_all(item in &c.items) (check_crate_item(prog… (line 72, blamed at line 73) | not counted by the judgment view |
| check_crate_item | free fn | check_free_fn(program, f, crate_id) => () (line 206) | 61 tests |
Proof trees
Failed proof tree
check_all_crates failedmod.rs:41args
rule "check all prefixes"mod.rs:53check_crate failedmod.rs:60args
rule "check crate"mod.rs:73check_crate_item failedmod.rs:178rule "free fn"mod.rs:206check_free_fn failedfns.rs:14args
rule "check free fn"fns.rs:24check_fn failedfns.rs:31args
rule "check fn"fns.rs:55check_fn_body failedfns.rs:62args
rule "expr fn body"fns.rs:90borrow_check failednll.rs:127args
rule "borrow_check"nll.rs:138borrow_check_block failednll.rs:145rule "basic block"nll.rs:160borrow_check_statement failednll.rs:177args
rule "let"nll.rs:194borrow_check_expr_has_ty failednll.rs:351args
rule "block"nll.rs:364borrow_check_expr failednll.rs:372args
rule "place"nll.rs:504access_permitted failednll.rs:797args
rule "access_permitted"nll.rs:809 (failed: if_false)