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

Negative coverage: borrow_check_expr / call / premise if input_args.len() == args.len()

Premise at line 513. Observed failure causes: if_false.

call
LineCoverageSource
49412(borrow_check_expr(
env,
assumptions,
state,
callee,
args.live_before(env, &state, places_live),
) => (callee_ty, state))
503✗(prove_ty_is_rigid(env, assumptions, state, callee_ty) => (RigidTy { name: RigidName::FnDef(fn_id), parameters }, state))
506✗(let Fn { id: _, safety, binder } = env.crates().fn_named(fn_id)?)
508✗(ProvenSet::singleton((safety, ProofTree::leaf("safety"))) => Safety::Safe)
509✗(let FnBoundData { input_args, output_ty, where_clauses, body: _ } =
binder.instantiate_with(parameters)?)
5131(if input_args.len() == args.len())
515✗(for_all(i in 0..args.len()) with(state)
(borrow_check_expr_has_ty(env, assumptions, state, &args[i], &input_args[i].ty, args[i+1..].live_before(env, &state, places_live)) => state))
518✗(prove_where_clauses(env, assumptions, state, where_clauses) => state)
──────── ("call")
52082(borrow_check_expr(env, assumptions, state, Expr::Call { callee, args }, places_live) => (output_ty, state))

1 test failed proving this premise:


Source location: tests/mir_typeck.rs:532 (all coverage from this test)

fn bar(v1: u32) -> u32 {
    let v0: u32 = identity::<u32>(v1, v1);
    return v0;
}
Failed proof tree

How to read this page