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

Negative coverage: prove_wc / outlives / premise prove_outlives(decls, env, assumptions, a, b) => c

Premise at line 146. Observed failure causes: failed_judgment.

outlives
LineCoverageSource
1467(prove_outlives(decls, env, assumptions, a, b) => c)
──────── ("outlives")
148113(prove_wc(decls, env, assumptions, Predicate::Outlives(a, b)) => c)

7 tests failed proving this premise:


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

fn foo<'a, 'b>(v1: &'a u32) -> &'b u32 {
    exists<'r0> {
        let v2: &'r0 u32 = v1;
        return v2;
    }
}
Failed proof tree

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

fn foo<'a, 'b>(v1: &'a u32, v2: &'b u32) -> () {
    let output: &'b u32 = v2;
    loop {
        output = v1;
    }
}
Failed proof tree

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

fn foo<'a, 'b, 'c>(v1: &'a u32) -> &'c u32
where
    'a: 'b,
{
    return v1;
}
Failed proof tree

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

fn foo<'a, 'b>(a: &'a u32) -> &'b u32 {
    let r: &'b u32 = identity::<&'b u32>(a);
    return r;
}
Failed proof tree

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

fn foo<'a, 'b>(p: &'a mut u32) -> u32 {
    let q: &'b mut u32 = &'b mut *p;
    q;
    return 0_u32;
}
Failed proof tree

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

fn use_it<'a, 'b>() -> u32 {
    exists<'r0> {
        let v: Invariant<'r0> = create_invariant::<'r0>();
        if true {
            return sink::<'a, 'r0>(v);
        } else {
            return sink::<'b, 'r0>(v);
        }
    }
}
Failed proof tree

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

fn use_both<'a, 'b>() -> u32 {
    exists<'r0> {
        let v: Invariant<'r0> = create_invariant::<'r0>();
        let w: Invariant<'r0> = create_invariant::<'r0>();
        sink::<'a, 'r0>(v);
        sink::<'b, 'r0>(w);
        return 0_u32;
    }
}
Failed proof tree