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)))
3113(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")
31854(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:4607

#[test]
fn flow_sensitive_invariance_use_it() {
    // [nll]: rustc errors
    FormalityTest::new(feature_gate_program(
        NLL_GATE,
        FLOW_SENSITIVE_INVARIANCE_USE_IT,
    ))
    .skip_execute()
    .err(expect_test::expect![[r#"
        crates/formality-rust/src/prove/prove_via.rs:8:1: no applicable rules for prove_via { goal: !lt_1 : !lt_2, via: @ wf(?lt_0), assumptions: {@ wf(?lt_0)}, env: Env { variables: [!lt_1, !lt_2, ?lt_0], bias: Soundness, pending: [], allow_pending_outlives: false } }

        crates/formality-rust/src/prove/prove_outlives.rs:8:1: no applicable rules for prove_outlives { a: !lt_1, b: !lt_2, assumptions: {@ wf(?lt_0)}, env: Env { variables: [!lt_1, !lt_2, ?lt_0], bias: Soundness, pending: [], allow_pending_outlives: false } }"#]]);

    // [polonius]: rustc errors
    FormalityTest::new(feature_gate_program(
        POLONIUS_ALPHA_GATE,
        FLOW_SENSITIVE_INVARIANCE_USE_IT,
    ))
    .skip_execute()
    .err(expect_test::expect![[r#"
        crates/formality-rust/src/prove/prove_via.rs:8:1: no applicable rules for prove_via { goal: !lt_1 : !lt_2, via: @ wf(?lt_0), assumptions: {@ wf(?lt_0)}, env: Env { variables: [!lt_1, !lt_2, ?lt_0], bias: Soundness, pending: [], allow_pending_outlives: false } }

        crates/formality-rust/src/prove/prove_outlives.rs:8:1: no applicable rules for prove_outlives { a: !lt_1, b: !lt_2, assumptions: {@ wf(?lt_0)}, env: Env { variables: [!lt_1, !lt_2, ?lt_0], bias: Soundness, pending: [], allow_pending_outlives: false } }"#]]);

    // [legacy]: rustc passes
    FormalityTest::new(feature_gate_program(
        POLONIUS_UNLOCKED_GATE,
        FLOW_SENSITIVE_INVARIANCE_USE_IT,
    ))
    .skip_execute()
    .ok();
}
Failed proof tree