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 / binop / premise if scalar.is_int()

Premise at line 487. Observed failure causes: if_false.

binop
LineCoverageSource
4851(borrow_check_expr(env, assumptions, state, lhs, rhs.live_before(env, &state, places_live_on_exit)) => (lhs_ty, state))
486✗(prove_ty_is_rigid(env, assumptions, state, &lhs_ty) => (RigidTy {name: RigidName::ScalarId(scalar), parameters: _}, state))
4871(if scalar.is_int())
4883(borrow_check_expr_has_ty(env, assumptions, state, rhs, &lhs_ty, places_live_on_exit) => state)
──────── ("binop")
49023(borrow_check_expr(env, assumptions, state, Expr::BinOp{lhs, op: _, rhs}, places_live_on_exit) => (lhs_ty, state))

1 test failed proving this premise:


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

fn foo() -> () {
    let x: bool = true * false;
}
Failed proof tree

How to read this page