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: record_place_use / read

read
LineCoverageSource
──────── ("read")
10454(record_place_use(state, AccessKind::Read, _place) => state)

4 tests exercised this rule:


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

fn foo() -> u32 {
    let a: u32 = 0_u32;
    a;
    a;
    return 0_u32;
}
Proof tree
… (200 of 1351 nodes shown)

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

fn foo() -> u32 {
    exists<'l0> {
        let a: u32 = 0_u32;
        let p: &'l0 u32 = &'l0 a;
        let q: &'l0 u32 = p;
        let r: &'l0 u32 = p;
        p;
        return 0_u32;
    }
}
Proof tree
… (200 of 1524 nodes shown)

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

fn main() -> () {
    let p: Pair = Pair { a: 2_u32, b: 3_u32 };
    p.b *= p.a + 4_u32;
    println!(p.b);
    println!(p.a);
}
Proof tree
… (200 of 1430 nodes shown)

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

fn main() -> () {
    let x: u32 = 12_u32;
    exists<'a> {
        let r: &'a u32 = &'a x;
        println!(*r & *r);
        println!(*r & 6_u32);
    }
}
Proof tree
… (200 of 2366 nodes shown)

How to read this page