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_tys.len() == args.len()

Premise at line 408. Observed failure causes: if_false.

call
LineCoverageSource
3883(borrow_check_expr(
env,
assumptions,
state,
callee,
args.live_before(env, &state, places_live),
) => (callee_ty, state))
397(prove_ty_is_rigid(env, assumptions, state, callee_ty) => (RigidTy { name: RigidName::FnDef(fn_id), parameters }, state))
400(let Fn { id: _, safety, binder } = env.crates().fn_named(fn_id)?)
402(ProvenSet::singleton((safety, ProofTree::leaf("safety"))) => Safety::Safe)
403(let FnBoundData { input_args, output_ty, where_clauses, body: _ } =
binder.instantiate_with(parameters)?)
407N/A(let input_tys: Vec<Ty> = input_args.iter().map(|a| a.ty.clone()).collect())
4081(if input_tys.len() == args.len())
410(for_all(i in 0..args.len()) with(state)
(borrow_check_expr_has_ty(env, assumptions, state, &args[i], &input_tys[i], places_live) => state))
413(prove_where_clauses(env, assumptions, state, where_clauses) => state)
──────── ("call")
41514(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:383

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