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 / struct / premise let Struct { id: _, binder } = env.crates().struct_named(&adt_id)?

Premise at line 626. Observed failure causes: inapplicable.

struct
LineCoverageSource
6261(let Struct { id: _, binder } = env.crates().struct_named(&adt_id)?)
627✗(if turbofish.parameters.len() == binder.len())
628✗(let StructBoundData { where_clauses, fields } = binder.instantiate_with(&turbofish.parameters)?)
631N/A(let expected_names: Set<FieldName> = for_all field in fields => field.name)
632N/A(let provided_names: Set<FieldName> = for_all field in field_exprs => field.name)
633✗(if expected_names == provided_names)
6371(if field_exprs.len() == provided_names.len())
640✗(for_all(i in 0..field_exprs.len()) with(state)
(field in fields)
(if field.name == field_exprs[i].name)
(borrow_check_expr_has_ty(env, assumptions, state, &field_exprs[i].value, &field.ty, field_exprs[i+1..].live_before(env, &state, places_live_on_exit)) => state))
645✗(prove_where_clauses(env, assumptions, state, where_clauses) => state)
647N/A(let ty = RigidTy::new(adt_id, &turbofish.parameters))
──────── ("struct")
64925(borrow_check_expr(env, assumptions, state, Expr::Struct { adt_id, turbofish, field_exprs }, places_live_on_exit) => (ty, state))

1 test failed proving this premise:


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

fn foo (v1: u32) -> u32 {
    let v2: u32 = Nonexistent { value: false };
    return v1;
}
Failed proof tree

How to read this page