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 154. Observed failure causes: failed_judgment.

outlives
LineCoverageSource
1544(prove_outlives(decls, env, assumptions, a, b) => c)
──────── ("outlives")
15696(prove_wc(decls, env, assumptions, Relation::Outlives(a, b)) => c)

4 tests failed proving this premise:


Source location: tests/borrowck.rs:2170

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

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

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

Source location: tests/borrowck.rs:2881

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