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: prove_place_is_movable / field

field
LineCoverageSource
10661(if let None = env.program.find_drop_impl(adt_id))
1067✗(prove_place_is_movable(env, assumptions, state, prefix) => state)
──────── ("field")
10697(prove_place_is_movable(
env,
assumptions,
state,
TypedPlaceExpressionData::Field(prefix, _, adt_id, _),
) => state)

7 tests exercised this rule:


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

fn foo() -> Datum {
    let x: Pair = Pair {
        first: Datum { value: 1_u32 },
        second: Datum { value: 2_u32 },
    };
    let a: Datum = x.first;
    let b: Datum = x.second;
    return b;
}
Proof tree
… (200 of 3542 nodes shown)

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

fn main() -> () {
    let p: Pair = Pair { x: 10_i32, y: 20_i32 };
    println!(p.x);
    println!(p.y);
}
Proof tree
… (200 of 3457 nodes shown)

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

fn main() -> () {
    let w: Wrapper<i32> = Wrapper::<i32> { val: 42_i32 };
    println!(w.val);
}
Proof tree
… (200 of 3437 nodes shown)

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

fn main() -> () {
    let s: S = S { b: second(), a: first() };
    println!(s.a);
    println!(s.b);
}
Proof tree
… (200 of 3521 nodes shown)

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

fn main() -> () {
    let w: Wrap<<S as Value>::Item> = Wrap::<<S as Value>::Item> { value: 7_u32 };
    println!(w.value);
}
Proof tree
… (200 of 3588 nodes shown)

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

fn main() -> () {
    let p: Pair = Pair { a: 1_u32, b: 10_u32 };
    p.b += p.a;
    println!(p.b);
}
Proof tree
… (200 of 3472 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 3507 nodes shown)

How to read this page