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_fn_ref / fn-ref / premise if binder.len() == args.len()

Premise at line 630. Observed failure causes: if_false.

fn-ref
LineCoverageSource
6291(let Fn { binder, .. } = env.crates().fn_named(id)?)
6302(if binder.len() == args.len())
631✗(let FnBoundData { where_clauses, .. } = binder.instantiate_with(args)?)
6325(prove_where_clauses(env, assumptions, state, where_clauses) => state)
633N/A(let ty = Ty::rigid(RigidName::fn_def(id), args))
──────── ("fn-ref")
63543(borrow_check_fn_ref(env, assumptions, state, id, args) => (ty, state))

2 tests failed proving this premise:


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

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

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

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

How to read this page