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: borrow_check_statement / exists / premise verify_universal_outlives(env, assumptions_body, &state.all_outlives) => ()

Premise at line 315. Observed failure causes: failed_judgment.

exists
LineCoverageSource
307(if feature_gate_enabled_in_program(&env.program, &FeatureGateName::PoloniusAlpha))
309N/A(let (env, subst, block) = env.instantiate_existentially(binder))
310N/A(let assumptions_body = (assumptions, wf_assumptions_for_existential_subst(&subst)))
31123(borrow_check_block(env, assumptions_body, state, block, places_live_on_exit) => state)
3151(verify_universal_outlives(env, assumptions_body, &state.all_outlives) => ())
316N/A(let state = state.pop_subst(&env.env, subst))
──────── ("exists")
31836(borrow_check_statement(env, assumptions, state, Stmt::Exists { binder }, places_live_on_exit) => (env, state))

1 test failed proving this premise:


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