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 / false

false
LineCoverageSource
──────── ("false")
4626(borrow_check_expr(_env, _assumptions, state, Expr::False, _places_live_on_exit) => (ScalarId::Bool, state))

6 tests exercised this rule:


Source location: tests/borrowck.rs:2960 (all coverage from this test)

fn foo<'a>(m: &'a mut Map) -> &'a mut Map {
    exists<'r0, 'r1> {
        let n: &'r0 mut Map = &'r0 mut *m;
        if false {
            return n;
        } else {
            let o: &'r1 mut Map = &'r1 mut *m;
            return o;
        }
    }
}
Proof tree
… (200 of 1350 nodes shown)

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

fn main() -> () {
    println!(1_i32);
    println!(true);
    println!(false);
}
Proof tree
… (200 of 995 nodes shown)

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

fn main() -> () {
    let x: i32 = 0_i32;
    'a: loop {
        if false {
            x = 1_i32;
            break 'a;
        } else {
            x = 2_i32;
            break 'a;
        }
    }
    println!(x);
}
Proof tree
… (200 of 1113 nodes shown)

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

fn foo () -> u8 {
    let v1: u16 = 5_u16;
    let v2: u32 = 5_u32;
    let v3: u64 = 5_u64;
    let v4: usize = 5_usize;
    let v5: i8 = 5_i8;
    let v6: i16 = 5_i16;
    let v7: i32 = 5_i32;
    let v8: i64 = 5_i64;
    let v9: isize = 5_isize;
    let v10: bool = false;
    return 5_u8;
}
Proof tree
… (200 of 1175 nodes shown)

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

fn foo (v1: u32) -> u32 {
    let v2: Dummy = Dummy { value: 1_u32, is_true: false };
    v2.value = 2_u32;
    return v1;
}
Proof tree
… (200 of 1079 nodes shown)

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

fn foo() -> bool {
    let v1: bool = false;
    return v1;
}
Proof tree
… (200 of 1018 nodes shown)