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_place_expr / struct field / premise if field.name == *field_name

Premise at line 589. Observed failure causes: if_false.

struct field
LineCoverageSource
583(borrow_check_place_expr(env, assumptions, state, prefix) => (prefix_typed, state))
5841(prove_ty_is_rigid(env, assumptions, state, &prefix_typed.ty) => (RigidTy { name: RigidName::AdtId(adt_id), parameters }, state))
585(let Struct { id: _, binder } = env.crates().struct_named(&adt_id)?)
586(let StructBoundData { where_clauses, fields } = binder.instantiate_with(&parameters)?)
587(prove_where_clauses(env, assumptions, state, where_clauses) => state)
588(field in fields)
5891(if field.name == *field_name)
──────── ("struct field")
5917(borrow_check_place_expr(env, assumptions, state, PlaceExpr::Field { prefix, field_name }) => (
TypedPlaceExpr::new(&field.ty, TypedPlaceExpressionData::field(prefix_typed, field_name)),
state,
))

1 test failed proving this premise:


Source location: tests/mir_typeck.rs:595

fn foo (v1: u32) -> u32 {
    let v2: Dummy = Dummy { value: 1 _ u32 };
    v2.nonexistent = 2 _ u32;
    return v1;
}
Failed proof tree