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 475. Observed failure causes: if_false.

call
LineCoverageSource
4556(borrow_check_expr(
env,
assumptions,
state,
callee,
args.live_before(env, &state, places_live),
) => (callee_ty, state))
464✗(prove_ty_is_rigid(env, assumptions, state, callee_ty) => (RigidTy { name: RigidName::FnDef(fn_id), parameters }, state))
467✗(let Fn { id: _, safety, binder } = env.crates().fn_named(fn_id)?)
469✗(ProvenSet::singleton((safety, ProofTree::leaf("safety"))) => Safety::Safe)
470✗(let FnBoundData { input_args, output_ty, where_clauses, body: _ } =
binder.instantiate_with(parameters)?)
474N/A(let input_tys: Vec<Ty> = input_args.iter().map(|a| a.ty.clone()).collect())
4751(if input_tys.len() == args.len())
477✗(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))
480✗(prove_where_clauses(env, assumptions, state, where_clauses) => state)
──────── ("call")
48241(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