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

Positive coverage: borrow_check_expr / bitwise xor

bitwise xor
LineCoverageSource
421N/A(let expr = Expr::bin_op(lhs, BinOpKind::BitXor, rhs))
4222(borrow_check_expr(env, assumptions, state, expr, places_live_on_exit) => (ty, state))
──────── ("bitwise xor")
42415(borrow_check_expr(env, assumptions, state, Expr::BitXor { lhs, rhs }, places_live_on_exit) => (ty, state))

15 tests exercised this rule:


Source location: tests/codegen.rs:1144 (all coverage from this test)

fn main() -> () {
    println!(12_i32 ^ 10_i32);
}
Proof tree
… (200 of 1301 nodes shown)

Source location: tests/codegen.rs:1159 (all coverage from this test)

fn main() -> () {
    println!(1_i32 ^ 2_i32 + 3_i32);
    println!(5_i32 + 3_i32 ^ 6_i32);
    println!(10_i32 - 4_i32 ^ 1_i32);
    println!(7_i32 ^ 2_i32 * 3_i32);
}
Proof tree
… (200 of 1377 nodes shown)

Source location: tests/codegen.rs:1172 (all coverage from this test)

fn main() -> () {
    println!(-1_i32 ^ 5_i32);
    println!(-8_i32 ^ -3_i32);
}
Proof tree
… (200 of 1314 nodes shown)

Source location: tests/codegen.rs:1184 (all coverage from this test)

fn main() -> () {
    println!(255_u8 ^ 15_u8);
}
Proof tree
… (200 of 1301 nodes shown)

Source location: tests/codegen.rs:1196 (all coverage from this test)

fn main() -> () { println!(left() ^ right()); }
}])
tc_ok()
ect_output("1\n2\n6\n")
);
}

#[test]
se_xor_with_parentheses() {
alityTest::new(crates![crate Foo {
fn main() -> () {
    println!((1_i32 ^ 2_i32) + 3_i32);
    println!(2_i32 * (3_i32 ^ 5_i32));
}
Proof tree
… (200 of 1369 nodes shown)

Source location: tests/codegen.rs:1209 (all coverage from this test)

fn main() -> () {
    println!((1_i32 ^ 2_i32) + 3_i32);
    println!(2_i32 * (3_i32 ^ 5_i32));
}
Proof tree
… (200 of 1335 nodes shown)

Source location: tests/codegen.rs:1223 (all coverage from this test)

fn main() -> () {
    let x: i32 = 5_i32;
    x = x ^ 3_i32;
    println!(x);
}
Proof tree
… (200 of 1342 nodes shown)

Source location: tests/codegen.rs:1271 (all coverage from this test)

fn main() -> () {
    println!(-128_i8 ^ -1_i8);
    println!(127_i8 ^ -1_i8);
}
Proof tree
… (200 of 1314 nodes shown)

Source location: tests/codegen.rs:1286 (all coverage from this test)

fn main() -> () {
    println!(340282366920938463463374607431768211455_u128
        ^ 170141183460469231731687303715884105728_u128);
    println!(170141183460469231731687303715884105728_u128 ^ 1_u128);
    println!(-170141183460469231731687303715884105728_i128 ^ -1_i128);
}
Proof tree
… (200 of 1327 nodes shown)

Source location: tests/codegen.rs:1311 (all coverage from this test)

fn main() -> () {
    println!(1_i32 | 2_i32 ^ 3_i32);
    println!(5_i32 ^ 1_i32 | 1_i32);
}
Proof tree
… (200 of 1334 nodes shown)

Source location: tests/codegen.rs:1376 (all coverage from this test)

fn main() -> () {
    println!((1_i32 | 2_i32) ^ 3_i32);
    println!(2_i32 * (1_i32 | 4_i32));
}

Proof trees omitted for the remaining 5 tests; each one is on its test’s page in Coverage by test.


Source location: tests/codegen.rs:1481 (all coverage from this test)

fn main() -> () {
    println!(5_i32 ^ 6_i32 & 3_i32);
    println!(6_i32 & 3_i32 ^ 1_i32);
}

Source location: tests/codegen.rs:1547 (all coverage from this test)

fn main() -> () {
    println!((5_i32 ^ 6_i32) & 3_i32);
    println!((6_i32 & 3_i32) * 2_i32);
}

Source location: tests/pr531_review_probes.rs:55 (all coverage from this test)

fn main() -> () {
    let x: u128 = 170141183460469231731687303715884105728_u128;
    x |= identity(1_u128 | 2_u128 ^ 3_u128);
    println!(x);
    println!(identity((1_u128 | 2_u128) ^ 3_u128));
}

Source location: tests/pr539_review_probes.rs:16 (all coverage from this test)

fn main() -> () {
    println!(identity(8_u32 | 6_u32 ^ 3_u32 & 1_u32));
    println!(identity((8_u32 | 6_u32 ^ 3_u32) & 1_u32));
    println!(identity(0_u32 & observed()));
}

How to read this page