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 borrow_check_expr_has_ty(env, assumptions, state, rhs, &lhs_ty, places_live_on_exit) => state

Premise at line 526. Observed failure causes: failed_judgment.

binop
LineCoverageSource
5233(borrow_check_expr(env, assumptions, state, lhs, rhs.live_before(env, &state, places_live_on_exit)) => (lhs_ty, state))
524✗(prove_ty_is_rigid(env, assumptions, state, &lhs_ty) => (RigidTy {name: RigidName::ScalarId(scalar), parameters: _}, state))
5256(if scalar.is_int())
5268(borrow_check_expr_has_ty(env, assumptions, state, rhs, &lhs_ty, places_live_on_exit) => state)
──────── ("binop")
52891(borrow_check_expr(env, assumptions, state, Expr::BinOp{lhs, op: _, rhs}, places_live_on_exit) => (lhs_ty, state))

8 tests failed proving this premise:


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

fn foo() -> () {
    let x: i32 = 1_i32 + 2_u32;
}
Failed proof tree

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

fn foo() -> () {
    let x: i32 = 10_i32 - 3_u32;
}
Failed proof tree

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

fn foo() -> () {
    let x: i32 = 3_i32 * 4_u32;
}
Failed proof tree

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

fn foo() -> () {
    let x: i32 = 7_i32 % 3_u32;
}
Failed proof tree

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

fn foo() -> () {
    let x: i32 = 3_i32 ^ 4_u32;
}
Failed proof tree

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

fn foo() -> () {
    let x: i32 = 3_i32 | 4_u32;
}
Failed proof tree

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

fn foo() -> () {
    let x: i32 = 3_i32 & 4_u32;
}
Failed proof tree

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

fn foo() -> () {
    let x: i32 = 12_i32 / 3_u32;
}
Failed proof tree

How to read this page