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

fn foo<'a, 'b>(a: &'a u32) -> &'b u32 {
    let r: &'b u32 = identity::<&'b u32>(a);
    return r;
}

Rules proved (0)

This test records no positive coverage.

Premises failed (18)

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 138)60 tests
borrow_check_blockbasic blockfor_all(i in 0..stmts.len()) with(env, state) (b… (line 159, blamed at line 160)not counted by the judgment view
borrow_check_statementletfor_all(init in init.into_iter()) with (state) /… (line 192, blamed at line 194)not counted by the judgment view
borrow_check_expr_has_tyblockborrow_check_expr(env, assumptions, state, expr,… (line 364)28 tests
borrow_check_expr_has_tyblockprove_assignable(env, assumptions, state, ty_exp… (line 365)4 tests
borrow_check_exprcallfor_all(i in 0..args.len()) with(state) (borrow_… (line 442, blamed at line 443)not counted by the judgment view
prove_assignablesubtypeprove_sub_type(env, assumptions, state, a, b) =>… (line 1085)9 tests
verify_universal_outlivesverify_universal_outlivesfor_all(v in env.env.variables()) (only_assumed_… (line 19, blamed at line 20)not counted by the judgment view
only_assumed_outlivesuniversal lifetimefor_all(param in transitively_outlived_by(env, o… (line 48, blamed at line 49)not counted by the judgment view
can_outliveuniversal targetprove(&env.program, &env.env, assumptions, Predi… (line 81)7 tests
check_free_fncheck free fncheck_fn(program, Env::default(), Wcs::t(), f, c… (line 24)61 tests
check_fncheck fncheck_fn_body(program, env, assumptions, body, i… (line 55)60 tests
check_fn_bodyexpr fn bodyborrow_check(typeck_env, assumptions, initial_st… (line 90)60 tests
check_all_cratescheck all prefixesfor_all(i in 0..crates.len()) (let program = cra… (line 51, blamed at line 53)not counted by the judgment view
check_cratecheck cratefor_all(item in &c.items) (check_crate_item(prog… (line 72, blamed at line 73)not counted by the judgment view
check_crate_itemfree fncheck_free_fn(program, f, crate_id) => () (line 206)61 tests
prove_wcoutlivesprove_outlives(decls, env, assumptions, a, b) =>… (line 146)7 tests
prove_wc_listsomeprove_wc(decls, env, assumptions, wc0) => c (line 26)42 tests

Proof trees

Failed proof tree