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")
4306(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:2733

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

Source location: tests/codegen.rs:24

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

Source location: tests/codegen.rs:377

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:35

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:234

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:670

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